Before Roddick was unable to continue, the 12th-seeded Murray was leading No. 3 seed Roddick, 5-3, in the first set.
The Scottish teenager also beat Roddick in a final last month in San Jose, Calif., and will appear in his fifth semifinal in six ATP events this season in one of Friday's semifinals.
Roddick called ATP trainer Bill Norris to the court at the end of the seventh game and received a massage to his upper left leg.
Roddick and Norris then went to the locker room for more treatment before the former No. 1 returned to the court.
Roddick dropped serve to go down, 3-5, and then retired.
Murray faces Djokovic in one semifinal match Friday.
2014 amfAR Inspiration Gala [PHOTOS]
Julius Randle breaks leg during NBA debut