The 23-year-old joined Sean Dyche’s side on a season-long loan at the beginning of August, but was kept out of action by lack of fitness and the terms of Burnley’s agreement with Liverpool.
This saw him start at left-back, in a much-changed back four alongside James Tarkowski, Kevin Long and Tendayi Darikwa.
It’s understood Dyche intends to use Flanagan at left-back this season.
Lining up against an enthusiastic Stanley side, who are managed by John Coleman and currently reside in League Two, Burnley struggled to make their mark throughout.
This was despite Saturday’s opening goalscorer Sam Vokes starting in attack, and fellow striker Andre Gray entering the fold on 66 minutes.
After a shaky start however, Flanagan began to hold his own at the back, showcasing the spirit and determination that saw him win over Liverpool supporters during the 2013/14 title-challenging campaign.
Posed a major threat by wing-back Janoi Donacien in particular, Flanagan largely impressed, making some strong tackles on the left flank.
As ever, Flanagan kept things simple, and pushed forward whenever required to provide support for the likes of Michael Kightly and George Boyd.
But Burnley were unable to get the ball past Stanley goalkeeper, former Aston Villa youth Elliot Parish.
This led the two sides into extra time and, ultimately, it was Stanley who prevailed, with Matty Pearson turning the ball home into the Burnley goal after a scramble in the penalty area.
Flanagan, who made a strong block just before Pearson’s strike, could do little to quell the Stanley charge in the closing stages, and Burnley crashed out of the cup as a result.