The free agent signings were announced Saturday, a day before the Bills open training camp in suburban Rochester.
The 6-foot-4 Gurley had one catch in three games with the Cleveland Browns last season. He has spent time with several teams since breaking into the NFL in 2011 as an undrafted free agent with Green Bay.
McIlwan has yet to play in an NFL game since breaking into the league in 2011. He was cut by Kansas City before the start of last season.
Both players participated on a tryout basis in Buffalo's mandatory minicamp last month.
AP NFL website: www.pro32.ap.org and www.twitter.com/AP-NFL