Ruff replaces Glen Gulutzan, who was fired after two seasons in Dallas.
Ruff, 53, let go by the Buffalo club in February, has a 571-432-78-84 record and eight playoff appearances. His victory total is 12th most all-time among NHL coaches.
"One of the trademarks of successful organizations is their ability to have continuity and stability for an extended period of time," Jim Nil, who took over as the Stars' general manager April 29, said in a statement Friday.
"It is clear from Lindy's record, and from our own conversations, that we have found the right person to provide that stability and lead this club to the next level. His steady hand and experience will prove invaluable in returning our team as a top-tier contender in the NHL."
Ruff said: "I am honored to be joining the Dallas Stars organization. After speaking at length with Jim Nill, it was clear that all the right pieces are coming together to return this club to the upper-echelon of the NHL. I look forward to leading its resurgence."
Swim Week Miami Beach 2014 [PHOTOS]