Ricciardo drove beautifully to pass five cars after Red Bull chose to pit for fresh tyres in a safety auto period.
Ricciardo's teammate Max Verstappen also chose to pit at the same time, but two errors cost him his chances.
The opening stint of the Chinese Grand Prix was largely free of drama, with Vettel on course for his third win in as many races this season.
Ricciardo dived in for new soft tyres with 23 laps remaining, while erstwhile leader Bottas and his main challenger Sebastian Vettel stayed out on mediums having passed the pitlane entry before the safety vehicle was deployed.
Shocker: While it was celebrations for one Red Bull it was disappointment for the other.
It was introduced so marshals could clear debris from the hairpin after a collision between Toro Rosso's Pierre Gasly and Brendon Harley.
Ultimately, though, the day belonged to Ricciardo, and while his sixth Grand Prix win may have been aided by a favorable safety vehicle period, his consummate drive to victory was littered with a series of clinical overtaking moves, and was all the more satisfying after an engine failure on Saturday limited his running earlier in the weekend.
The main favorites of the season Lewis Hamilton and Sebastian Vettel the race in Shanghai in the net and are unable to bring British during the stage repeatedly lost the position and finished only fourth, and German because of a collision with Verstappen dropped to eighth place.
A bold pass on Valtteri Bottas for the lead capped a stunning charge from Ricciardo after Red Bull opted to pit him during a safety auto for fresh tyres.
"It's a fun way to win for sure", Ricciardo told Sky F1.
Hamilton and Vettel, who were expected to be fighting it out for the world championship this term, were left in Ricciardo's wake.
The moves on Hamilton and Bottas were made in his trademark style - making a hugely committed dive down the inside from a long way back, but always in total control on the edge of adhesion.
Driver of the day: Again, it's hard to go past Ricciardo.
"I don't seem to win boring races!", an emotional Ricciardo said on the podium.
In winning the seventh Grand Prix of his career, Ricciardo, who began his Shanghai run from P6, bedazzled the Chinese fans, who would've been expecting a hat-trick of wins by Vettel.
"It's so close between Red Bull, Ferrari and us", he said.
It is the first time in the turbo-hybrid era that Mercedes have gone three races in a row without victory. The Mercedes soon passed Raikkonen, but Vettel followed closely behind. "Kimi is quite aggressive" Hamilton said over the radio, but the team urged him to keep his head down. He apologised to Vettel afterwards. Vettel, Carlos Sainz of Renault and Haas' Kevin Magnussen rounded out the top 10.
Lewis Hamilton also endured a frustrating afternoon, finishing in fourth place.
Meanwhile Raikkonen's team-mate Vettel was having problems of his own, with Nico Hulkenberg pulling away and Fernando Alonso closing.
"That was fun, a lot of fun and I just about believe it now", said Ricciardo.
And if anyone you know had predicted Daniel Ricciardo winning the Chinese Grand Prix after a weekend that saw him nearly miss qualifying due to a turbo failure in his Red Bull-Tag Heuer RB 14's Renault engine, then you know they are definitely pulling your leg!
Daniel Ricciardo is the master conjurer who comes from next to nowhere to win races.
Daniel Ricciardo at the post-race press conference: "Once I was aware we had the pace I wasn't going to let it slip".
"Fat lip and all I got the win".