The Bills allowed a league-high 18 rushing touchdowns and an AFC-worst 1,487 rush yards after trading Marcell Dareus in Week 8 last season, according to ESPN Stats & Information research.
A first-round pick in the 2014 NFL Draft, Lotulelei has been with the Carolina Panthers for the first five years of his career.
Lotulelei is reunited with McDermott, who was the Panthers defensive coordinator before taking over in Buffalo in January 2017. By signing Lotulelei, Buffalo's front office fills a glaring hole with a familiar face. Williams, 34, has been contemplating his playing future this offseason.
Lotulelei, 28, has spent his entire career as a member of the Carolina Panthers, which means that he played valuable snaps for Bills head coach Sean McDermott when both were a member of the Panthers organization.
Lotulelei has forced two fumbles and has 11 1/2 sacks in 76 career games, and was named to the National Football League all-rookie team in 2013.
Defensive tackle was one of the Bills' biggest needs entering free agency, with only three players - Adolphus Washington, Marquavius Lewis and Rickey Hatley - under contract at the position for next season.
The overhaul comes despite the Bills coming off a 9-7 season in which they ended a 17-season playoff drought.