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). Chandler reinstated Lanier and the other players in June 1949. Lanier immediately held out for more money than he was being paid at the time of his leaving for Mexico, but eventually signed a contract paying him the same amount as in 1946.
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).