Loxley held the late dash of the returning Defoe to win the Dubai City of Gold at Meydan.
The five-year-old stepped up on previous form to land the Group Two prize and give trainer Charlie Appleby a big-race double after the victory of Barney Roy in the Jebel Hatta.
Good Trip and Jalmoud shared the early pacemaking duties, with the latter leading at the top of the straight.
Loxley (33-1) took over with Mountain Hunter second before Coronation Cup winner Defoe – who had been off since the King George at Ascot in July – got going late to grab second place, getting within a short head of the winner.
Appleby said: "Loxley is a horse we have always really liked, but to be honest, has disappointed in both starts at the Carnival, so it is great to see him get his head back in front with such a nice performance."
It was also a quick brace for jockey Mickael Barzalona following his success aboard Matterhorn in the Al Maktoum Challenge.
Barzalona said: "He's a nice little horse and today he travelled a bit strong, but I was lucky to find a way to settle just behind Defoe. When he came into the straight, he did the job well."
Despite being beaten, the Roger Varian-trained Defoe put up a promising effort on his first start for 224 days, ahead of the Sheema Classic on Dubai World Cup night.
His rider Andrea Atzeni said: "He went quite nicely. He relaxed into a nice gallop, the winner just got me for speed at a crucial time. My horse hasn't run for a while, he stayed on well all the way to the line and with another stride he would have got up."
RaceBets been introduced Loxley at 14-1 for the Sheema Classic, with Defoe 8-1 from 9-1 for the same race.