Manager Lou Piniella disclosed the move Tuesday, a day after Gregg blew another save in a 4-1 loss to San Diego.
Marmol was chosen to take over the closer role, although Piniella said he also considered left-hander John Grabow and right-hander Angel Guzman. Marmol has more experience in the closer's role than the others.
Gregg has blown three of his last five save chances, including Monday night's loss to the Padres when rookie Kyle Blanks hit a three-run homer in the ninth to cap a four-run inning.
It was the 12th homer allowed by Gregg in 56 1/3 innings this season, the most in the majors for a reliever. Gregg allowed 10 home runs over the last two seasons with Florida while saving 61 games.
"We needed to try a different approach," Piniella said. "We have been patient, if you want to use that word. But we've lost some tough, tough ballgames."
The Cubs have lost eight of 11 games heading into Tuesday night's game against San Diego to drop a season-high six games behind the St. Louis Cardinals in the NL Central. The Cubs were four games out in the wild-card race.
"What we need to do is win some baseball games," Piniella said. "We haven't done it in a long, long time."
Gregg, who has 23 saves in 29 chances this season, was matter of fact about his demotion.
"I've had my chances and I didn't produce enough," he said. "Now I will just try and help the team win."
Gregg will become one of Chicago's set-up men, Piniella said.
Marmol lost the closer job to Gregg coming out of spring training as the replacement for free agent Kerry Wood.
"I am just going to go out there and give it my best," said Marmol, who has four saves this season as a set-up man.
He has allowed one homer in 56 1/3 innings, but has had control issues with 52 walks and 11 hit batters.
"He's had some experience closing. It's a natural progression," said Piniella, who added there was no timetable for how long Marmol would be the closer.
Piniella said under some circumstances, both Grabow and Guzman could get opportunities to close games.
All three of Gregg's blown saves this month were on home runs. He had consecutive blown saves on Aug. 1-2 at Florida. Philadelphia came back for a 4-3 win last Wednesday when the right-hander gave up a homer to Ben Francisco in the 12th inning.
Against the Padres, Gregg was one strike away from giving the Cubs the win, when Chase Headley tied the game at 1-all with an RBI double in the ninth. After an intentional walk to Kevin Kouzmanoff, Blanks connected on a fastball right down the middle for a three-run homer and the win.
"He understood," Piniella said about the conversation he had with Gregg along with pitching coach Larry Rothschild. "This wasn't something that cropped up overnight. He's had some success, but lately, he's been struggling."