Kianoush Jahanpour, a ministry spokesman, said the cases were detected in the holy city of Qom, south of the Iranian capital.
"In the past two days, some suspect cases of the new coronavirus were observed in Qom city," he said, quoted by state news agency IRNA.
"Teams were dispatched after receiving the reports, and based on the existing protocols the suspect cases were isolated and tested," said Jahanpour.
"Out of the samples sent, a laboratory tested two of them as positive for coronavirus just minutes ago and some of the other samples were type B influenza."
The health ministry spokesman said additional tests were being carried out on the two cases and final results would be announced "as soon as possible".
Last week, local media in Iran reported that a 63-year-old woman had died after she suspectedly fell ill with the coronavirus infection.
The report was quickly denied by Jahanpour, who asserted that there were still no cases of the virus in Iran.
The new coronavirus epidemic has killed more than 2,000 people in China and infected more than 74,000. It has spread to at least two dozen countries.
The United Arab Emirates was the first country in the Middle East to report cases of coronavirus last month.
Follow us Twitter and Instagram to stay connected