The American world number 28 lost the first set 6-4 due to a shoddy performance on his second serve before struggling to force a tie-break against the 34-year-old Karlovic.
Querrey pulled through to take the tie-break and ultimately wrapped up a 4-6 7-6 (7/4) 6-4 win in an hour and 43 minutes. The 25-year-old from Las Vegas will face either Igor Sijsling or Paul-Henri Mathieu in the next round.
Reigning champion Jo-Wilfried Tsonga, who has received a bye into the second round, is top seeded in Metz while Gilles Simon, Andreas Seppi, Phillip Kohlschreiber and Benoit Paire are among the other favourites to win.
Earlier on Monday, Pierre-Hugues Herbert, Marton Fucsovics, Marc Gicquel and Mischa Zverev made it through to the first-round draw with respective qualifying wins over Alexander Zverev, Michael Berrer, Simon Stadler and Vincent Millot.