With two outs and two men on base in a 0-0 game, Lester hit an 0-2 pitch back at Lackey before the ball hit the pitcher's leg and bounced near shortstop Jhonny Peralta, who had no play.
Lester received a standing ovation from the crowd at Wrigley when he reached first base. He then looked up and pointed at the sky with both fingers, as players often do after getting on base.
"Just making light of it," Lester said. "I know Lackey [who was a teammate of his in Boston from 2010-2014], I played a long time with him. We had some bets going into the game, a little trash talk involved. It's been a long time coming. It's nice but it's not something you can really enjoy right now."
Lester has one walk and one hit in his career. Including the postseason, he is 1-for-72.
He took to Twitter on Tuesday morning to note his accomplishment.
Would've been nice to cap off my 1st hit with a W but at least we're off the schnide, .031 never looked so good! Let's play 2 today! #NVRQT— Jon Lester (@JLester34) July 7, 2015
"How about it? He doesn't have a bad swing," Chicago manager Joe Maddon said. "He's hit some balls really hard this year and hit into some bad luck. Hopefully it's going to lead to more hits. There's a lot of guys with worse swings than he has that have gotten hits."
Former San Diego Padres right-handed starting pitcher Joey Hamilton held the previous mark, after going 0-for-57 in 1994 and '95.
The game was delayed 1 hour, 16 minutes by rain after Justin Grimm came out to start the eighth inning in relief of Lester with the Cardinals leading 2-0. Grimm got three quick outs in the rain before the umpires halted play.
Lester (4-7) took the loss but limited St. Louis to two unearned runs, two hits and two walks while recording eight strikeouts.
Lester's bid for his second career no-hitter ended with one out in the seventh when Bryant couldn't handle Peralta's sharp grounder in back of third base, which also ended Lester's streak of 18 batters retired.
"I had pretty good command of everything,'' Lester said.
Information from ESPN's Stats & Information and The Associated Press was used in this report.