The 22-year-old scored 20 goals and recorded 13 assists last season to help MK Dons reach the play-offs.
Twine was also included in the 2021-22 League One team of the season and PFA team of the year.
"I am buzzing. I have definitely made the right decision joining Burnley," Twine told the club's official website after completing his transfer.
"I spoke in depth with the manager and his plans are exciting, it was a no brainer for me to sign. I can't wait to get started and it feels like the right place for me."
"We are delighted to have brought Scott to the club. He's an exciting young player that will help us in the short-term process and in the long-term project at Burnley," said Kompany.
"He's a player we have looked at for a little while now, we know he can score goals and affect games. We're glad to welcome him to the squad."