A slow start by Leeds with only one chance (a header by Tresor Kandol) in the first 17 minutes before Johnathon Howson hit a right footed volley from 20 yards, which was tipped over the bar by Peter Brezovan in goal for Town.
This seemed to spark a lacklustre Leeds into action and chances were created but they soon died out. Leeds had most of the possession but they were not playing at their best.
Then on 31 minutes David Prutton sent in a cross which was handled by Swindon Captain Hasney Algofree and Jermaine Beckford smashed in the penalty 1-0.
Beckford was booked on 15 minutes for unsporting behaviour, as were Miguel Comminges and Algofree of Swindon.
Leeds went in at half time with their lead intact but within one minute of the re-start Swindon were level with a goal by Lee Peacock 1-1. The whites were simply not working hard enough.
But on 55 minutes Beckford got his second with a 12 yard volley when he worked well with Kandol 2-1.
Another Swindon booking came on 58 minutes when Christian Roberts fouled David Prutton. Radostin Kishishev replaced Seb Carole on the hour. Swindon's Michael Pook was booked in the 68th minute for a foul on Howson and Jerill Ifil was booked on 70 minutes for fouling Kandol.
Mark De Vries came on for Kandol shortly after Swindon had a goal disallowed for offside in the 82nd minute. The last minute saw Leon Constantine replace Beckford and yet another Swindon booking - Billy Paynter for dissent. Leeds held on to collect another valuable three points and move up to 4th.
The crowd was 27,990.
Leeds United 2 Swindon Town 1