Stewart returns to the League Two club following his departure from Crewe, the team he joined after leaving Adams Park in 2014.
Ainsworth told the club’s official website: “Anthony is a tremendous talent and I’m delighted that he’s agreed to come back to Adams Park.
“We understood his reasons for leaving the club and we did our best to keep him here. However, this is a fresh start for both Anthony and for us, and I’m confident that he can pick up where he left off as an excellent young player with real potential to develop.
“He’s got pace, he’s a threat in the opposition box and he can play in a number of positions. I’ve no doubt he’ll be a great addition to the side.”