In the 200m individual medley final on 31 July 2012, Ye was in third place at the start of the final leg of the race, but she again overtook her competitors in the freestyle leg, winning the gold medal with the time 2:07.57, a new Olympic record. In preliminary heats she had swum 2:08.90, the same time that she achieved in the 2011 World Championships and her tenth best time of all time, with splits of 28.16, 1:00.54, and 1:38.17.