Bangladesh were set to play a 50-over game and a Twenty20 international on April 29 and 30 in Lahore, the first international cricket matches in the troubled country for three years.
But Additional Attorney General M.K. Rahman told AFP that the high court in Dhaka had ordered Bangladesh's cricket authorities to explain why the tour was scheduled to go ahead despite concerns over the team's safety.
"It asked the cricket board to explain in the next four weeks. During the four weeks, the court imposed an injunction on the cricket team's tour to Pakistan," he said.
Bangladesh would be the first team to visit Pakistan since a militant attack on the Sri Lankan team bus during the Lahore Test in 2009, when eight people died and seven visiting players and an assistant coach were injured.
The high court gave the order following a petition by a lawyer and a university teacher.
Pakistani political leaders, players and fans had welcomed the planned tour, but in Bangladesh concern over the visit has grown since it was announced on Sunday.
"We told the court that the Pakistan tour would risk the lives of our cricketers," Hassan Azim, lawyer for the two petitioners, told AFP.
"Pakistan is not a safe place for an international sports event. No other international teams are travelling to Pakistan. Why should Bangladesh go? The decision was imposed on the cricketers."
Anti-Pakistan feelings still run strong in Bangladesh, which was part of Pakistan until 1971 when it won independence in a bloody nine-month war in which Dhaka says an estimated three million people lost their lives.
Bangladesh's coach Stuart Law, from Australia, this week expressed fears about the team's schedule.
"It's got to be made sure by the two associating boards that everyone is 100 percent safe to go," he said. "I have spent time with the players and everyone is a bit concerned."
Law declined to confirm if he would go on the tour, while Bangladesh's cricket authorities said they were seeking clearance from the International Cricket Council (ICC).
Foreign teams shunned Pakistan after the 2009 attacks, forcing them to play their home series on neutral venues, mostly in the United Arab Emirates.