An own goal from Oliver Risser early in the second half and a late goal from substitute Craig Westcarr was enough to see Chesterfield lift the Johnstone's Paint Trophy on Sunday afternoon.
In front of 49,602 at Wembley, the Robins were unable to break down the hosts with Risser's goal and the injury-time second from Westcarr separating the two sides on a scorching afternoon in the capital.
Town made just one change to the side that won against Torquay United in League 2 on Tuesday night, with new loan signing Jay McEveley replacing Alessandro Cibocchi at left-back. Chesterfield created the first real opening of the game with experienced frontman Jack Lester, the Spireites captain, getting on the end of a right wing cross by saw a close range header gathered with ease by Wes Foderingham.
The League One side continued to press early on and had the ball in the net on eight minutes through Lester, but the offside flag had already been raised.
Town's early attacking efforts saw a cross-shot from Paul Benson land on the roof of the net on ten minutes before winning a succession of corners soon after, with Joe Devera heading the second narrowly over the bar. The Robins carved out another opportunity on 19 minutes with loanee Lee Holmes cutting inside from the left before curling a right-footed effort from the edge of the box which flew just over the upright.
Just before the half-hour mark Holmes saw another shot cleared for a corner before another series of corners saw the Robins press again but without really testing Chesterfield stopper Tommy Lee.
John Sheridan's side were dealt a blow nine minutes before the break with Lester forced off through injury and he was replaced by former Notts County frontman Craig Westcarr.
The first half ended with Town on the front foot and the referee called time on the first 45 minutes after two minutes of injury time. There were no half-time changes for either side but the game came to life just 60 seconds after the restart. After a cross had only been half cleared, the ball fell to Alex Mendy on the left hand side of the area and his low ball into the box was turned past Foderingham by Oliver Risser to hand Chesterfield the lead.
Alan Connell was the first player to be cautioned of the afternoon on 56 minutes after showing his frustration at a decision by match referee Tony Bates. The Spireites carved out another opportunity on the hour with substitute Westcarr finding space on the edge of the box but he dragged his shot narrowly wide of the left hand post. Di Canio made his first change of the afternoon on 62 minutes when he replaced Risser with Irishman Ronan Murray. The move also saw a tactical switch with Town moving to a 3-4-3 with the substitute playing just behind Connell and Benson.
The second Swindon switch came with 18 minutes remaining as Tottenham Hotspur loanee John Bostock was introduced in place of Jonathan Smith at the heart of the midfield. Chesterfield had a clear opening for a second goal on 73 minutes with Westcarr capitalising on a slip at the back before racing clear. He took the ball on to the edge of the box but his shot drifted narrowly wide of the left hand post.
The Robins created another chance 15 minutes before time with good work from Ferry and Holmes, but the loanee shot straight at Lee in the Chesterfield goal. Di Canio then made his final change with Alessandro Cibocchi coming off the bench for McEveley at left-back.
Chesterfield sealed the win inside the four added minutes of injury-time with Westcarr racing clear to slot past Foderingham to secure the trophy for John Sheridan's side.