Villar signed with the Philadelphia Phillies as an international free agent. Before the 2011 season, the Phillies traded Villar, J. A. Happ, and Anthony Gose to the Houston Astros for Roy Oswalt.
Houston Astros
Villar was named the 94th best prospect in baseball by Baseball America prior to the 2011 season. He was invited to Astros' spring training in 2012. Villar played for the Oklahoma City RedHawks in 2013, and was named the Astros' minor league hitter of the month for June 2013. On July 21, the Astros promoted Villar to the major leagues. On July 30, 2013, Villar stole home against the Baltimore Orioles. His strong finish to 2013 made him the team's Opening Day starter in 2014, but struggled offensively in 2014 as well as 2015. Nevertheless, he was named to the Astros' roster for the 2015 American League Wild Card Game. In the seventh inning, he pinch-ran for Chris Carter, stole second base, and scored on a single by José Altuve to make the score 3-0, which ended up being the final score of the game.
Milwaukee Brewers
The Astros traded Villar to the Milwaukee Brewers for Cy Sneed on November 19, 2015. Villar impressed Brewers manager Craig Counsell in Spring Training, and became the Brewers' Opening Day shortstop. Villar played very well for the first half of the season despite the team's struggles, posting a.298 batting average, 6 home runs and a league-leading 19 stolen bases before the All-Star Break. After top prospect Orlando Arcia was promoted to the Majors, Villar was moved to third base. He finished the year with 62 stolen bases, leading the league, four more than Billy Hamilton of the Cincinnati Reds, along with a.285 average, 62 RBIs, and 19 home runs. He led the National League in power-speed number. After the acquisition of third basemanTravis Shaw, the Brewers announced that Villar would shift to second base. Villar struggled for most of 2017, and lost his starting job at second base after the Brewers traded for Neil Walker. With Keon Broxton struggling, Villar began to get regular starts in center field. Defensive struggles and the emergence of rookie outfielder Brett Phillips resulted in Villar once again returning to a bench role.
Baltimore Orioles
At the trade deadline on July 31, 2018, Villar, along with minor leaguers Luis Ortiz and Jean Carmona, was sent to the Baltimore Orioles by the Brewers who acquired Jonathan Schoop for its postseason run. Villar was activated on August 2nd and played his first game with the Orioles later that night. He collected two hits and scored a run in his Orioles debut. He collected three hits the next night, including his first RBI with the O's. Two nights later, he would collect three more hits in three at-bats, including a double, home run, one RBI, a walk and three runs scored. In 54 games, Villar hit.258/.336/.392 with eight home runs and led the Orioles with 21 stolen bases. Villar became the fifth Oriole to hit for the cycle in a 9-6 home loss to the New York Yankees on August 5, 2019. He hit a triple and a double in the third and fifth innings respectively off Masahiro Tanaka, a two-run homer in the sixth off Tommy Kahnle that had tied the game at 6-6 and a single in the ninth off Aroldis Chapman. His one-out three-run homer off Caleb Ferguson in the seventh inning of an Orioles' 7-3 home victory over the Los Angeles Dodgers on September 11 was the 6,106th of and established a new major league record for most total home runs in a season, surpassing the 6,105 set two years earlier in. He was the first MLB player with at least 24 home runs and 40 stolen bases in the same season since Carlos Gómez in 2013. Along with Starlin Castro, Whit Merrifield, Marcus Semien and Jorge Soler, he was one of only five players to appear in all 162 games in 2019.
Miami Marlins
On December 2, 2019, Villar was traded to the Miami Marlins in exchange for Easton Lucas.