All of the victims are Christian, it said.
The attack could spark a new wave of Christian rioting in a community still traumatized by a New Year's suicide attack on a church that killed at least 21 worshippers as they were leaving Mass.
No motive was immediately known for the shooting which came less than two weeks after the suicide bomber blew himself up outside the church in the Mediterranean city of Alexandria, sparking three days of fierce riots by Christians.
The ministry statement identified the policeman as Amer Ashour Abdel-Zaher, a Muslim, and said he boarded the Cairo-bound train at the town of Samalout in Egypt's central Minya province and opened fire on the passengers with a handgun.
It was not immediately clear if he was aware his victims were all Christian, however Christian women, who made up four of the five wounded, stand out in the conservative south as they would not be wearing headscarves as most Muslim women do.
The statement added that Abdel-Zaher was on his way to work at a town near Samalout.
The train originated in Assiut which, like Samalout, is home to a substantial Christian community.
Police arrested the attacker at his nearby home after he fled the scene and he was being questioned, according to the ministry statement.
Shooting attacks against Christians occasionally take place in Egypt's impoverished south. In January 2010, gunmen opened fire on worshippers leaving a Coptic Christmas Eve church service in southern Egypt, killing six Christians and a Muslim guard.
Many Christians charge that the authorities are not doing enough to protect them and in fact allege some members of the security services turn a blind eye to anti-Christian incidents.
The attack comes as Egypt was bristling at international expressions of concern over the safety of its Christian population and recalled its ambassador to the Vatican following comments by Pope Benedict XVI.
In a speech Monday, Benedict cited recent attacks on Christians in Egypt, Iraq and Nigeria, and said governments must take effective measures to protect religious minorities.
Hossam Zaki, Egypt's Foreign Ministry spokesman, described Benedict's remarks as "unacceptable" and charged him with interfering in the country's internal affairs.
"Egypt will not allow non-Egyptians to interfere in its internal affairs under any pretext," he said.
Sheik Ahmed el-Tayyib, the imam of the Al-Azhar, the premier institute of Islamic learning in the Sunni Muslim world, also blasted the Pope's remarks.
"Protection of Christians is an internal affair and should be carried out by the governments as they (the Christians) are their citizens like other citizens," he said in a statement.
President Hosni Mubarak has repeatedly said that the government will do its utmost to protect Egypt's Christians and has accused foreign groups of being behind the New Year's church attack.
The New Year's suicide attack on the church reopened long festering wounds in a Christian community that says its members feel like second class citizens in their own country due to widespread discrimination.
Coptic Christians demonstrated around the country, including Assiut, in the aftermath of the bombing and called for better protection and equal rights.
Christians make up about 10 percent of Egypt's nearly 80 million people.