McClain signed with the Ravens on July 27, 2007. He scored his first career touchdown on a Kyle Boller pass against the San Diego Chargers on November 25, 2007. He finished his rookie season with eight carries for 18 yards, nine receptions for 55 yards, and 1 touchdown.
On December 20, 2008, McClain ran for 82 yards to score the final touchdown in Texas Stadium against the Dallas Cowboys. Along with teammate Willis McGahee's 77-yard touchdown run on the previous Ravens drive, he and McGahee became the first players ever to run two 70+ touchdown runs on back-to-back drives. The run was also the longest run by an opponent in Texas Stadium. In addition, McClain had 139 rushing yards on the day.
During the 2008 season, McClain became the team's primary running-back as he rushed for a team-high 902 yards and 10 touchdowns on 232 carries (3.9 yards per carry). He also caught 19 passes for 123 yards and a touchdown. McClain's performance earned him a Pro Bowl selection, in which he scored a touchdown off of a Fumblerooski play handed off by former Denver Broncos Quarterback Jay Cutler. Cutler put the ball between McClain's legs in which he ran in for a touchdown. During his last two years as a Raven, McClain lost carries to Willis McGahee and Ray Rice. He publicly complained about not getting enough touches, which led to his departure.