The Finn tops the early drivers' standings and he showed why with a lap of one minute 33.330 seconds, pipping Ferrari's Sebastian Vettel by just 0.027secs ahead of Sunday's 1,000th race.
Third-fastest was Red Bull's Max Verstappen with Hamilton, the reigning world champion, a significant 0.707secs off the pace.
Fifth was Nico Hulkenberg of Renault, followed by McLaren's Carlos Sainz.
Bottas and Hamilton both spun their cars early on in second practice in almost identical fashion, but the only real harm done was to their pride.
Bottas, 29, who leads Hamilton by a point in the standings thanks to his bonus-point victory in Melbourne, recovered his poise quicker from his acrobatics at Turn 1.
Charles Leclerc, Vettel's talented young Ferrari team-mate, has failed so far to get to grips with the Shanghai circuit and clocked only the seventh-best time.
So close to a maiden victory in Bahrain two weeks ago until his Ferrari lost power, the 21-year-old's day finished early for checks on his car's cooling system.
Four-time world champion Vettel, who went fastest in the morning practice, again set the early pace in the second session before Bottas stepped up his challenge.
Germany's Vettel, who is facing criticism after a series of errors stretching back to last season, was unhappy after being held up by Racing Point's Sergio Perez.
"They race harder on Friday than they do on Sunday," Vettel thundered over his radio.
Going into the third race of the season, Verstappen is third in the standings, behind the Mercedes pair, with Leclerc and Vettel fourth and fifth.
Verstappen's afternoon ended on a sour note, the young Dutchman complaining that "there's something's not right". "It feels like the car is broken," he added.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ