Pospisil, whose season-ending goal is to improve his ATP Tour ranking enough to qualify for one of the 32 seedings at January's Australian Open, dominated Karlovic in 59 minutes.
The world No. 40 never faced a break point and limited the big man's threatening ace count to a mere eight, while striking five key aces of his own.
"I played really well today and did a lot of things well," Pospisil said. "I'm thrilled and very excited over how it went.
"My goal going in was obviously to focus on her serve and try to handle it. I was really concentrating even more on the things I could control. It was inevitable that he was going to serve aces, I just had to deal with them."
Pospisil, from Vancouver, will next face another Croat, Ivan Dodig, who beat former finalist Kei Nishikori in the second round. Pospisil remains the lone Canadian in the field after Milos Raonic withdrew for personal reasons and Daniel Nestor lost alongside Pospisil in the doubles first round.
Pospisil brought his best came to court from the start against Karlovic, breaking the Croat for 4-2 in the first set and taking it in 28 minutes with a second-serve ace on the first of three set points,
The second set went much the same way as Pospisil broke in the seventh game for a 4-3 margin, then converted on a match point three games later.
"I served very well," Pospisil said. "I've been working on a lot of things with my new coach (Frederic Fontang) and the hard work is paying off."
Karlovic had beaten Pospisil earlier this year at the post-Wimbledon Newport grass tournament.
Vasek's breakout performance this year was reaching the semifinal of the Rogers Cup in Montreal, where he lost to Raonic. Since then, Pospisil had not advanced past the second round in his last six tournaments until Basel.