Police have said they plan to seek life sentences for the men under the country's anti-terrorism law.
Mohammad Amir Khan, a defence lawyer for the men, said: "The five men denied having been in contact with al-Qaeda, Jaish-e-Mohammad [a Pakistani group] or any other militant group.
"They told the court they wanted to go to Afghanistan to help their Muslim brothers, like those needing medical or financial assistance, and had no plans to carry out any
activity in Pakistan."
'Jihad not terrorism'
Addressing journalists as he entered the courtroom in Sargodha on Monday, Ramy Zamzam, one of the detainees, said: "We are not terrorists. We are jihadists, and jihad is not terrorism."
The court remanded the men, named in addition to Zamzam as Umar Farooq, Waqar Khan, Ahmed Minni, Aman Hassan Yemer, to prison for 14 days to give police time to prepare their case.
"We have told the court that police have completed their investigation and have enough evidence against the five suspects to try them under anti-terrorism law," Matiullah Shahani, a police officer, said.
Officers have not said what they believe the group's intended target was, but authorities say the men had a map of Chashma Barrage, a complex located in Pakistan near nuclear power facilities that includes a water reservoir and other structures.
It lies in the province of Punjab, about 200km southwest of Islamabad, the capital,
Officials in both countries have said they expect the men to eventually be deported back to the US, though charging them in Pakistan could delay that process.
The US embassy has declined to comment on the potential charges the men face in Pakistan.