The 30-year-old was a free agent and becomes new Sunderland manager Jack Ross’ second summer signing, joining another former Tynecastle player, Alim Ozturk, at the Stadium of Light.
McLaughlin’s form last season saw him earn international recognition and he won his first Scotland cap in the friendly international against Mexico earlier this month.
Ross, who guided St Mirren to promotion to the Premiership before leaving to take over at the English League 1 side told the Sunderland website: “Jon was in Scotland last season, but he’s spent the rest of his career in England and played in successful teams in this division. He’s a really good signing for us because he will bring security and stability to that position, as well as experience to the team, and play a key role moving forward.
“He’s a safe pair of hands.”
McLaughlin started his career with Harrogate Railway Athletic and Harrogate Town before signing for Bradford City and making 145 appearances for the Bantams during a six-year spell.
During his time at Valley Parade, McLaughlin played a pivotal role as Bradford won the Sky Bet League Two play-offs and reached the 2013 League Cup final.
He joined Burton Albion in 2014 and was part of the side that earned back-to-back promotions before moving to Hearts last summer.