Lavery, who played for Sheffield Wednesday and United, and had a loan spell with Rotherham United, joins from Walsall, where he scored seven goals in 46 appearances last season.
Before he signed his first professional deal the now-28-year-old, who has played international youth football for the country of his birth as well as that of his parents, was reported to be in talks about a move to Bradford but it has taken 10 years to come about.
Instead he began his career at Hillsborough, where the highlight was scoring twice in their famous 6-0 win over Leeds United in 2014. He also scored in a win over Rotherham the following year.
Lavery was due to make his full Northern Ireland debut in 2015, but missed a friendly with Qatar and a European Championship qualifyier against Romania because he was best man at his brother's wedding.
He joins Alex Gilliead, Liam Ridehalgh, Lee Angol, Oscar Threlkeld, Abo Eisa, Andy Cook, Fiacre Kelleher and Yann Songo'o in moving to Valley Parade this summer.