The 25-year-old, who scored three goals in the Championship last year, will also have an option for a third season at Meadow Lane.
Manager Chris Kiwomya told the club's official website: "I think everyone was aware that one of our top priorities this summer was adding extra firepower to the squad and I knew very early on that Danny was the man that I wanted to bring in.
"It was far from straightforward, but then it never is when you're going after good players, they always have other clubs interested in them and that is reassuring in some ways.
"I know Danny well, having seen him play at the very start of his career and I think he's the perfect fit for Notts County, he's a player that has the ability to excite the fans and we're looking forward to seeing him in action."
Haynes has also had spells with Ipswich Town, Bristol City and Barnsley.