Flames could be seen shooting through the roof of the Walmart at 9450 Joliet Road. The Sam's Club, which is next door, was not damaged.
Both stores were evacuated while fire crews worked to put out the stubborn blaze.
"Roof fires are very dangerous and especially if you get a fire underneath the tar paper and roofing it can travel very far. That's why we went to a 3-11. It could have been a lot worse. We were lucky to be able to contain it," said Chief Dan Hermes, Peasantview Fire District.
"You could tell something was really burning and they had a hard time getting it out, whatever it was that was burning," said Kathy Stechmiller, shopper.
As of 4 p.m. they were still on the scene watching for hot spots. The fire has been out since about 2 p.m.
Officials said some roofing material caught fire around 1:30 p.m. The Walmart was open while under construction.
No one was injured, but there is some water damage to the Walmart.
The Sam's Club reopened later Thursday afternoon.
Officials have not determined what cause the fire.