The world number one struggled to beat Karlovic 7-6, 7-6 in the semifinals of the Swiss Indoors in his hometown Basel on Saturday.
Karlovic fired 14 aces to down Spain's Fernando Verdasco 4-6, 6-3, 6-4 in a first-round match on Tuesday and will now stand in the way of the Swiss, who had a first-round bye like all the seeds.
German Tommy Haas, seeded ninth, moved closer to a Masters Cup spot by edging past Serbian qualifier Janko Tipsarevic 6-3, 6-7, 6-3 in the second round.
Finn Jarkko Nieminen beat Argentine Juan Monaco 6-4, 6-4 to set up a second-round match against Britain's number one Andy Murray, who was involved in a car crash on his way to his Paris hotel on Monday but escaped unhurt.
Nieminen took just 69 minutes to move past Monaco. Murray, seeded 15th, and is also still in the race for a place in Shanghai. Fabrice Santoro thrilled the home crowd by beating Spain's Albert Montanes 7-6, 6-2 to set up a second-round clash with world number three Novak Djokovic.
Tsonga advanced with a 6-3, 3-6, 6-3 victory over fellow Frenchman Sebastien Grosjean, winner of the tournament in 2001. Frenchman Paul-Henri Mathieu dropped out of the Masters Cup race when he lost 4-6, 6-2, 6-3 to Croatia's Mario Ancic.
Ancic, who also beat Mathieu at the Madrid Masters earlier this month, next faces Czech Tomas Berdych, winner here in 2005. Former world number one Juan Carlos Ferrero of Spain will not be going to Shanghai either after being beaten 6-4, 6-2 by Cypriot Marcos Baghdatis.
Paes-Damm ousted
The Indo-Czech pair of Leander Paes and Martin Damm squandered a first-set lead to bow out of the Paris Masters tournament, adds PTI from Paris.
Paes-Damm went down fighting against Jeff Coetzee of South Africa and Rogier Wassen of Netherlands 6-3, 6-7 (5), 9-11 in the first round on Monday. The number five team in the ATP Doubles Race will next play in the season ending prestigious Tennis Masters Cup in Shanghai.