The race was marked by difficulties in Friday practice sessions when weather in Shanghai prevented the medical helicopter from being available and only twenty minutes of running was possible. Lewis Hamilton took his sixth consecutive pole position at the Chinese Grand Prix, ahead of Sebastian Vettel and teammate Valtteri Bottas. The race began with a wet track but there was no rain during the race, and Hamilton led the race from start to finish and set the fastest lap. Vettel pitted to change from intermediate to slick tyres during a virtual safety car, dropping him to sixth position, but recovered to second place. Max Verstappen started 16th and went on to complete the podium, finishing third.

Both of Friday's practice sessions were significantly affected by the weather conditions of low cloud, rain and smog. The first session took place with the track surface damp, and featured little activity before the session was red-flagged with only 20 minutes of running having been completed.[3] Safety rules require that an injured driver with a neurological condition must be able to reach a hospital within 20 minutes, either by helicopter or ambulance.[4] Prevailing weather conditions made it impossible for the medical helicopter to land at the Shanghai hospital located 38 km from the track, and an ambulance would be unable to reach the hospital within the required time, and so the cars were prohibited from on-track running until an emergency medical transport became available.

The weather situation did not improve and the second practice session was abandoned altogether.[3][5] Some drivers, including Hamilton and world championship leader Sebastian Vettel, had no running on Friday, and the fastest time set on Friday was 1:50.491 by Max Verstappen, set in wet conditions.[5] There were calls led by Lewis Hamilton to change schedule to allow all sessions to be run. However, these were rejected by the organisation, as it would disrupt television schedules and, in case of potential rescheduling of the race to Monday, would also lead to significant logistical problems for the Bahrain race scheduled only a week later.[4][5]

Hamilton was granted permission to cross the track during the second practice session to greet fans and throw signed caps into the crowd in the grandstands; he used social media to suggest the situation provided an opportunity for new owners to be "proactive and creative".[6][7] Calls were made for a contingency plan for circumstances where a practice session is cancelled such as opening paddock access for fans at the track.[8]

With dry weather on Saturday, described as "almost-sunshine in perpetually smog-grey Shanghai",[9] the third practice session ran on time but faced the teams with the challenge of preparing for qualifying with just one practice session instead of the usual three. Most teams opted to split tyre duties between their drivers and to collect some data on performance on longer runs, while also using their only opportunity to prepare for the afternoon's qualifying session.[10] Weather forecasts predicted a high chance of rain during the race on Sunday,[9] adding an extra complication to the teams' calculations going into their single practice session. The Force India team described the situation in a tweet: "Never has the Saturday morning session been so important."[11]

Vettel set the session's fastest time of 1:33.336, just 0.053 s ahead of teammate Kimi Räikkönen;[12][13] both of these times were more than two seconds faster than Nico Rosberg's pole position time from the 2016 race (1:35.402).[14] The two Mercedes drivers finished the session around 0.3 to 0.5 s behind the Ferraris, though Hamilton made a mistake at the hairpin on a lap which matched Vettel's pace in the first two sectors. Valtteri Bottas lost track time when the 'T wing' was dislodged from his car and repeatedly ran wide at the final corner.[13] The rest of the field were at least a second per lap slower than the leading cars, led by Felipe Massa (1:34.773)[12] ahead of the Red Bull drivers.[13] The Red Bulls set the early pace in the session when running on heavy fuel loads, but were unable to match the pace of Ferrari or Mercedes in qualifying simulations.[15] Behind Red Bull, competition was much closer, with positions eight to ten (Lance Stroll, Jolyon Palmer, and Carlos Sainz Jr.) covered by only 0.041 s[12] and positions eleven to sixteen (Nico Hülkenberg, Kevin Magnussen, Sergio Pérez, Romain Grosjean, Daniil Kvyat, and Esteban Ocon) covered by 0.362 s.[10] Two-times world champion Fernando Alonso and the McLaren team were left competing only with Sauber at the bottom of the timing sheets, at least 2.5 s off the pace[13] and described by a commentator as "battl[ing] with the poor performance, reliability and fuel consumption of the Honda engine".[9]

Sky Sports F1 predicted that Ferrari went into qualifying with an advantage over Mercedes and that those two teams appeared to be in a class of their own,[13] a prediction borne out by the results.[16] Vettel set the fastest time in the first part of qualifying of 1:33.078, just over a quarter of a second ahead of Hamilton, who shaded Räikkönen by less than one one-hundredth of a second[17] – but the Ferraris were on the soft tyres and the Mercedes on the (faster) super-softs. Red Bull's Daniel Ricciardo was the "best of the rest" in all three qualifying sessions, though around a second off the fastest times, showing that Red Bull's relatively poor pace compared to the top two teams in Australia was not a one-off[16][18] and placing them in an "unwanted league of their own".[19]

Haas driver Grosjean had a spin at the final corner early in the session, managing to keep the car off the wall and returning to the pits with only a ruined set of tyres. Sauber driver Antonio Giovinazzi was not so fortunate. He was running in fifteenth late in the session when he spun on the astroturf on the outside of the final corner, hitting the wall hard and coming to rest in the middle of the track.[20] With double waved-yellow flags on the start–finish straight, no driver could set an improved time and Giovinazzi advanced to Q2 but with a car that was unable to run and so qualified 15th. Two drivers eliminated in Q1, Palmer and Grosjean, who were both looking to out-qualify Giovinazzi when his accident occurred, were subsequently given five grid-slot penalties; the stewards stated that they "made no attempt to significantly reduce [their] speed in the area of a double waved-yellow flag".[21] Grosjean disputed this statement, posting telemetry on Twitter showing that he braked 50 m earlier for the corner and was travelling 45 km/h slower,[22] though the stewards' decision was final.[21] Haas team boss Guenther Steiner supported Grosjean, arguing he had clearly slowed and lamenting the lost opportunity as Grosjean "could have made it into Q3".[23] The rebuild of Giovinazzi's car necessitated a new gearbox, leading him to be demoted to 18th on grid, ahead of only Grosjean and Palmer.[24]

Red Bull's Verstappen had engine misfire problems and did not set a qualifying time until late in the session, 1.5 s slower than his teammate in fifth. Verstappen was trying for an improved time when Giovinazzi crashed and was consequently eliminated in 19th place, though he was scheduled to start from 17th on the grid.[18]

In the second phase of qualifying, Vettel set a fast time early in the session but Hamilton was only slower by 0.015 s on the same tyres. Räikkönen set the fastest time of 1:32.181 late in the session, 0.21 s ahead of his teammate,[17] and faster than Michael Schumacher's all-time lap record for the circuit set in 2004.[16] Fifth-fastest driver Ricciardo was nearly a second behind Bottas in fourth place. The two Mercedes drivers and Ricciardo were the only drivers not to do a second run. Hülkenberg and Pérez posted improved times in the last moments of the session, advancing to Q3, with Sainz, Ericsson, Magnussen, and Alonso eliminated.[16]

Hamilton had an untidy first lap in the third phase of qualifying, but still laid down a provisional pole position time of 1:31.902, with Vettel in second down by 0.184 s, followed by Bottas. Räikkönen's pace was 0.7 s slower Hamilton, but still ahead of Ricciardo in fifth by almost the same amount. All of the top four subsequently improved their times but the positions remained unchanged. Hamilton's new lap record time was 1:31.678 and Vettel's 1:31.864 was only one one-thousandth of a second ahead of Bottas, with Räikkönen at 1:32.140 nearly nine-tenths of a second ahead of Ricciardo.[16][17] Sixth place went to Massa, nearly half a second behind the Red Bull and just ahead of Hülkenberg's Renault. Williams driver Lance Stroll, competing in his first Q3 session in only the second race of his Formula 1 career, took tenth place. This was a major improvement from the 19th place he managed on début, partly attributed to changing to a lighter power steering setting – Stroll won the 2016 European Formula 3 Championship where power steering is not used, and accepted that taking some wrong decisions is an inevitable part of stepping up to Formula 1.[25]

The FIA took steps to ensure that access to emergency medical treatment, lack of which had led to cancellation of most of Friday practice, would not impede running of the race itself. A police escort was made available to facilitate rapid ground transportation, and specialist neurological equipment was relocated to a hospital located five kilometres from the track.[28] This included arranging "for a complete neurosurgery team from Huashan Hospital to be present at Ruijin Hospital on Sunday" leading the FIA medical team to be "satisfied that the Ruijin Hospital will not only be easily accessible in all weather conditions, but will also be able to provide the required care".[29]

There was considerable rain on the morning of the race,[30] but the start was to be taken following the standard procedure. The track was damp before the race, but would dry out as the day progressed. Notably, the main straight remained considerably wetter than the rest of the track, observed by Martin Brundle of Sky Sports F1 as possibly owing to the architecture of the media centre and overpass pavilions precipitating the track beneath with residual rainwater – something Giovinazzi would later learn with chagrin when he spun and crashed as a result of losing grip thereunder.

As the first 'wet' race of the season with new regulation wider tyres, virtually all teams began on intermediates both to gather data on their performance and as a precaution. Only artificial pre-season testing at Barcelona had emulated similar conditions, although not all teams were present there.[31] Pitlane reporter Ted Kravitz would go on to later note that within the first few laps, significant degradation of the intermediate tyres was found on the front left tyres across the board – a matter made in turn more complicated by the semi-dry/wet nature of the track. Many drivers, including Alonso and Vettel reported of drying conditions before the race, whilst Hamilton's team estimated that a transition point where slicks would be appropriate would come around lap 6.[32] Despite this, only Sainz went to the grid with super-soft option slick tyres; however, Palmer, who was marred by a grid penalty, peeled away from the formation lap into the pits before the race start to change out his intermediates for slicks, starting his race from the pit lane.[33]

Hamilton defended his pole immediately with a rapid and clean start, remaining unchallenged for the remainder of the race session. Vettel defended second place fending off a bold challenge from Bottas on the outside in turn 1. Räikkönen lost his place to Ricciardo early on and would prove to be on the back foot for the remainder of the race, later holding up teammate Vettel. Incidentally, Vettel was noted by the stewards as being laterally to the left of his grid space at the start and was investigated for being out of position – since his car was edged towards Hamilton, yet no action was taken. Many middle- and back-markers also made significant gains in the first lap, especially Verstappen, who overtook nine cars in the space of two minutes earning the title of "Driver of the Day".[30][34] The early action was however soon neutralised following contact between Pérez and Stroll which left Stroll spun out and beached in a gravel trap with a ruined set of tyres. The removal of his car warranted a virtual safety car during which Vettel pitted for slicks.[35] Just moments after racing resumed, Giovinazzi had a major crash on the start–finish straight, the second time he had spun off on the straight, marking an end to his unfortunate weekend. Debris strewn across the surface and the Sauber car's removal prompted deployment of a safety car. As the safety car led traffic through the pits, avoiding the removal work and obstructions, most drivers seized the opportunity to change to slicks.[36] Hülkenberg was given a five-second penalty for overtaking Grosjean under the virtual safety car, and a further ten-second penalty for overtaking Ericsson under the safety car.[37] In a move he described as a "stupid mistake", Bottas spun behind the safety car while trying to warm his tyres, dropping down to 12th and was criticised by his team boss and former manager Toto Wolff.[38]

By the time the safety car came in, Hamilton was leading from Ricciardo and Verstappen, who had made a series of overtakes in the slippery conditions, with the Ferraris fourth and fifth.[39] Verstappen overtook Ricciardo on lap 11 for second place, having started 16th, again demonstrating his skill in difficult conditions (similar to the 2016 Brazilian Grand Prix). With the Ferraris unable to overtake Ricciardo, Hamilton and Verstappen pull out a significant lead,[36] with Hamilton four seconds ahead of Verstappen and nine seconds ahead of Ricciardo by lap 20 – the lap Vettel overtook Räikkönen. Two laps later, Vettel overtook Ricciardo and rapidly closed in on Verstappen.[35] By lap 27, Hamilton had built a lead of 8.5 s over Verstappen with Vettel about 1.5 s further back, and Ricciardo and Räikkönen about 2 s apart and 4 s behind Vettel. Verstappen made a mistake on lap 29, locking up and allowing Vettel to pass for second,[39] 10.6 s behind Hamilton with 27 laps remaining. Verstappen stopped for fresh super-soft tyres the following lap,[35] returning to the track 6th behind Bottas.

Verstappen showed great pace on his fresh tyres, quickly overtaking Bottas, and leading to pit stops for Vettel (who was losing time to Hamilton) and then for Hamilton on lap 37, returning to the track on new soft tyres just ahead of Räikkönen. Räikkönen was the last of the top six drivers to stop for tyres despite repeated complaints of tyre problems, likely because pitting demoted him from second to sixth, behind the two Red Bull cars.[35] By lap 42, the top five positions were Hamilton – Vettel – Verstappen – Ricciardo – Räikkönen. The Red Bulls closed up and battled over the final podium position over the last few laps, but Ricciardo did not manage to overtake his teammate,[36] and the order remained unchanged throughout the last 15 laps. Bottas recovered to take sixth place,[30] and Sainz, Magnussen, Pérez, and Ocon rounded out the top ten.

The race was the 54th win of Hamilton's Formula 1 career, his 5th victory in the Chinese Grand Prix[35] (having won previously in 2008, 2011, 2014, and 2015), and the 65th win for Mercedes in their 150th race. With Hamilton winning the race and Vettel in second, the two go to the third race in Bahrain equal in the World Drivers' Championship standings, with 43 points each, but with Mercedes having overtaken Ferrari in the Constructors' Championship.[39] The fastest lap of the race was set by Lewis Hamilton on lap 44 (1:35.378),[40] which was over four seconds faster than Nico Hülkenberg's fastest lap of 1:39.824 in the 2016 race.[41] Hamilton became the second driver, after Schumacher, to win five or more times at three different tracks, and he equalled Alain Prost's career total of 106 podiums,[30] placing him equal second on the all-time list of career podium finishes.[42] The race was the third "grand slam" of Hamilton's career – winning from pole position after leading every lap and setting the fastest lap – adding to 2014 Malaysian and 2015 Italian Grands Prix. Hamilton also equalled Jim Clark's career record of 11 "hat-tricks" – races won from pole while setting the fastest lap – placing him equal second on the all-time list.