Born in Denton, North Carolina, Lanier was one of just a handful of players who remained active during the World War II years. A naturally right-handed player, he had become a left-handed pitcher only because he twice broke his right arm in childhood. After signing with the Cardinals in 1937, he reached the major leagues in 1938. He had arguably his best season in 1943, compiling a 15–7 record with a league-best 1.90 ERA. In 1944 he won a career-high 17 games, and was the winner of the final game of the World Series against the crosstown Browns. He was named an NL All-Star in both 1943 and 1944.
Lanier, along with a dozen other major leaguers, defected to the Mexican League in 1946 after being offered a salary nearly double what he was making with the Cardinals. Disappointed by poor playing conditions and allegedly broken contract promises, he tried to return to the Cardinals in 1948, but was barred by an order from commissioner Happy Chandler, imposing a five-year suspension on all players who had jumped to the Mexican League. In response, Lanier and teammate Fred Martin, as well as Danny Gardella of the New York Giants, sued Major League Baseball in federal court, challenging baseball's reserve clause as a violation of U.S. antitrust law (anticipating the similar suit by Curt Flood some 25 years later). The dispute was settled when Chandler lifted the suspensions in June 1949 and the players dropped their suits.
Lanier rejoined the Cardinals in 1949. After winning a total of 101 games for the club, he ended his career with the New York Giants (1952–53) and the Browns (1953).