The men were chained together when the attack took place in the eastern city of Faislabad as they were being taken back into custody after their court appearance.
They were arrested a month ago after leaflets allegedly bearing their names and featuring derogatory remarks against the Prophet Muhammad were found in the town, said Shahbaz Bhatti, the minister for minority affairs. He said mosques in Faislabad had called for the men to be attacked.
Bhatti said he suspected the men were falsely accused of blasphemy by people with a grudge against them. Their families had maintained their innocence, he said.
The brothers were killed by two gunmen as they left court, said police officer Rana Ahmed Hasan. A police officer accompanying the men was wounded, he said, adding the killers escaped.
Pakistan's blasphemy laws have been often criticized by religious minorities and human rights activists.
In its latest report on religious freedom in Pakistan, the U.S. State Department said the laws are often abused to settle local disputes and discriminate against minorities.
Muslims make up an estimated 97 percent of Pakistan's 180 million people, most of them Sunni.
Bhatti said he believed the brothers were innocent.
"I personally don't think that anyone who wrote derogatory things against Muhammad would put their names on the bottom," he said. "This was just to settle a personal issue."
Bhatti has long campaigned against the blasphemy laws, which were introduced President Gen. Zia ul-Haq in the 1980s to win the support of hard-line religious groups.
Repealing them now would likely meet opposition from the same groups, something that could cause unrest.
Associated Press Writers Babar Dogar in Lahore and Zarar Khan in Islamabad contributed to this report.