Teenage tribesmen from Pakistan's north-western Bajaur tribal region were abducted by the militants last week while they were on an outing in Afghanistan's border province of Kunar on the Muslim festival of Eid.
"If the Pakistan government and the tribal elders don't respond to our demands, we will not free the boys," Mullah Dadullah, the Taliban commander in Bajaur, told a group of reporters who were taken to a border hideout on Tuesday.
Four of the 23 prisoners who were between the ages of 15 to 21 were shown to reporters during the visit to the area between Marah Warah district in Kunar province and the Bajaur tribal region.
More than 30 militants armed with heavy and light guns accompanied the Taliban commander and the young prisoners who were crying.
Dadullah demanded the release of prisoners including women and children detained in jails in Peshawar, the main city in the Pakistani northwest and Bajaur region.
He also demanded that the government provide compensation for the houses destroyed in Pakistani military operations in Bajaur.
He said Taliban's shura will decide the fate of the prisoners if there was no response from the authorities or the tribal elders.
Under centuries-old tribal customs, tribesmen living along the frontier can freely move across the border.
A Pakistani military spokesman said last week that 40 young tribesmen were abducted. He said 10 of the boys were released while 30 were still in custody.
They belonged to the ethnic Pashtun Mamoun tribe, which is opposed to Al-Qaeda and the Taliban and has raised militias to fight them.
Bajaur has long been an infiltration route for militants entering Afghanistan to fight US-led forces there.
Afghan president Hamid Karzai on Wednesday asked the head of the Kunar provincial council and the elders of the area to help secure the release of the boys.