The 22-year-old spent the majority of last season on loan at York and, while his long-term future appears to be with the Clarets, he has admitted he is prepared for another loan move this season.
York was not the only side O'Neill turned out for on loan last term, having later joined Southend on an emergency 30-day loan.
But manager Sean Dyche seems to have earmarked the defender as a man for the future at Turf Moor, wherever he ends up this campaign.
“I’m delighted to have signed a new deal and that the gaffer has given me the chance to be here for another two years," O'Neill told the club's official website.
“I’m looking to get fit now after the injury I sustained whilst I was at Southend last season.
“Sean saw fit to send me out on loan to get some more games under my belt and now I’m back here looking to play and compete.
“I know that will be hard now that we’re in the Premier League but if not, then I will be looking to go out on loan again if that is something the gaffer wants me to do.
“I’m happy to be back here with a great group of lads and I’m thoroughly looking forward to pre-season.”
The news comes at a busy time for Burnley, with the club having recently announced several signings, including goalkeeper Matt Gilks, midfielders Matt Taylor and Stephen Reid and forward Marvin Sordell.
Clarets fans will hope Dyche's steady approach in the transfer market can help their side stay up next season without overspending.