The two clubs came to a financial agreement earlier in the week and the 21-year-old former Leicester defender has penned a two-year deal a Turf Moor.
After making three senior appearances for the Foxes and cutting his teeth during loan spells with Tranmere and Kettering, former England Under-17 international O'Neill joined the Stags last summer and played a key role in their run to the Blue Square Bet Premier play-offs.
Burnley boss Eddie Howe said: "As a manager you always want players snapping at the heels of those wearing the shirts. To do that we need to build a squad. To be successful you need that strength in depth and Luke is a welcome addition.
"He is in the attacking mould and likes to get forward. He has a lot of assists to his name and although he prefers right-back, he can play in a variety of positions across the back.
"He brings that versatility and has huge potential. Luke is a player who has done it the hard way by dropping down to Conference level. He is hungry, has played for England at Under-17 level and has gained experience of league football at several clubs, so we look forward to working with him and hopefully improving him as a player."