Juan Lagares drove in two runs and reliever Vic Black escaped a major jam unscathed to keep New York in control after Niese exited. Star third baseman David Wright also was removed in the seventh, one inning after he was hit in the upper back by an 88 mph fastball from Dan Straily.
The Mets, outhit 7-4, said Wright was lifted with a sore left shoulder.
The 23-year-old Flores, a touted hitting prospect trying to show he can play an adequate shortstop in the majors, followed Lagares' RBI double with a two-run single in the second.
Flores also made a diving stop and another difficult play in the hole to prevent base hits. He turned a pair of double plays, including one that got Niese (7-8) out of a bases-loaded jam after Chicago's first two batters reached on errors.
Niese took a 7-1 lead into the seventh before giving up five straight hits, including Ruggiano's leadoff homer. The last one was a line-drive RBI single by pinch-hitter Ryan Sweeney that struck the left-hander on his pitching arm.
That was it for Niese, who departed with the bases loaded and New York ahead 7-3. Black, who has excelled at stranding runners, then retired the top three batters in Chicago's lineup to stop the rally.
Niese has won consecutive starts after dropping four in a row.