David Fuller, 67, filmed himself abusing at least 100 bodies in two Kent hospital morgues over 12 years.
Sajid Javid told the Commons the inquiry would look at the offences and their “national implications”.
He said: “It will help us understand how these offences took place without detection in the trust, identify any areas where early action by the trust was necessary, and then consider wider national issues, including for the NHS.”
The inquiry will be split into two parts, an interim report published early in the new year and a second final report looking at the broader national picture and wider lessons for the NHS.
“We have a responsibility to everybody affected by these shocking crimes,” Mr Javid added.
“Nothing that we can say will undo the damage that has been done, but we must act to make sure nothing like this can ever happen again.”
Sir Jonathan Michael, a fellow at the Royal College of Physicians, will chair the inquiry.
He was heading up an independent investigation by the Maidstone and Tunbridge Wells NHS Trust has commissioned an independent investigation, but this is being replaced by the new inquiry, Mr Javid told the Commons.
Fuller kept millions of images and videos of his mortuary crimes on discs and hard drives.
They were were dated between 2008 and November 2020, and he labelled some of the folders with names of his victims.
Fuller had worked at hospitals since 1989 and was at the Kent and Sussex Hospital until it closed in September 2011.
He was transferred to the Tunbridge Wells Hospital at Pembury, where the offences continued until his arrest in 2020.
Investigators said Fuller would work late shifts and go into the morgue when other staff had left.