Jiji Press said the order, which includes firms which use the products in processed food, came after melamine was found in four items made by one of Japan's leading food makers, which had earlier issued a recall as a precaution.
The Ministry of Health, Labor and Welfare order requires importers to test their goods at registered inspection institutions. Violators could face up to one year in prison or fines of up to one million yen (9,400 dollars), Jiji reported.
Japan's Marudai Food Co recalled more than 300,000 buns and other products last week fearing contamination by tainted Chinese milk.
A public health centre in Osaka Prefecture said four of Marudai's products were tainted by the chemical: Gratin Crepe Corn ready meals, Cream Panda and Matcha Azuki Milk Man sweet buns for consumers and Cream Panda buns for commercial use, Kyodo News reported.
Marudai said no consumers have complained of illness after eating its products, Kyodo reported.
The health ministry has also ordered the examination of drugs and cosmetics that contain Chinese-made milk, Jiji reported.
Japan's regional governors have asked Tokyo to suspend imports of all Chinese dairy products after tens of thousands of children fell sick in the country and four died after ingesting melamine, normally used to make plastics.
Food safety has become a major political issue in Japan. Ten people suffered pesticide poisoning in December and January, and thousands of others reported feeling sick after eating frozen dumplings imported from China.
Asia's largest economy imports 60 percent of its food, the highest rate of any rich country.