Alfaro signed with the Texas Rangers as a free agent. Prior to the 2013 season he was ranked by MLB.com as the 88th-best prospect in baseball.  He is the 54th-best prospect by Baseball America. After the 2013 season he played in the Arizona Fall League.  
On November 20, 2014, the Rangers added Alfaro to their 40-man roster to protect him from being selected in the Rule 5 draft.
On July 31, 2015, the Rangers traded Alfaro, Nick Williams, Matt Harrison, Jake Thompson, Alec Asher, and Jerad Eickhoff to the Philadelphia Phillies for Cole Hamels and Jake Diekman.  The Phillies promoted Alfaro to the major leagues on August 26, 2016.  He was optioned back to the Double-A Reading Fightin Phils the next day. He was recalled on September 11 after the Reading season ended.