With the win, Memphis (6-5, 5-3 C-USA) became eligible for a postseason bowl for the third straight season.
Williams finished the game with 127 yards on 27 carries and a pair of touchdowns, while Avery added 93 yards on the ground. Marshall's defense held Avery to 1-of-8 passing for minus-3 yards.
Ahmad Bradshaw had 89 rushing yards on 26 carries, as he fell three yards short of becoming the eighth player in school history to eclipse the 1,000-yard rushing mark. Bradshaw's 997 rushing yards are the 12th-most single-season yards in school history.
Marshall quarterback Jimmy Skinner finished the game 11-of-19 passing for 97 yards.
Senior co-captain Wilbur Hargrove led all Herd receivers with 40 yards on a pair of catches.
After Memphis and Marshall exchanged stalled opening drives in the first quarter, the Tigers rebounded with a quick six-play, 78-yard drive to take a 7-0 lead.
Williams accounted for 40 of the Tigers' 78 yards, including a one-yard touchdown. That score was Williams' 51st rushing touchdown of his career at Memphis.
It didn't take long for the Tigers to produce another offensive scoring drive. Avery rushed for 39 yards on four carries, including a 23-yard run that set up Williams' second score of the game.
Williams' second one-yard touchdown of the first quarter capped off a 10-play, 56-yard drive that clipped 4:19 off the clock. It marked the 16th time that Williams tallied multiple rushing touchdowns in a game.
Trailing 14-0 to begin the second quarter, Marshall drove to inside the Memphis 40-yard line. But, the Herd failed to convert on fourth-and-three, giving the ball back to the Tigers.
Marshall wouldn't let a second opportunity escape, as the Thundering Herd took advantage of a 28-yard punt from Memphis' Michael Gibson. That gave the Herd excellent field position at its own 35-yard line. Ten plays and 45 yards later, junior Ian O'Connor connected on a 37-yard field goal, cutting the Memphis lead to 14-3.
As the second quarter wound to an end, Memphis place kicker Stephen Gostkowski connected on a 49-yard field goal to give the Tigers a 17-3 lead heading into the half.
Avery and Williams combined for 149 rushing yards in the first half with Avery leading all rushers with 77 yards.
Bradshaw rushed for 59 yards on 16 carries. Skinner connected on 5-of-11 passing for 48 yards. Marcus Fitzgerald hauled in a pair of catches for 16 yards, while Hargrove added a 19-yard reception.
Memphis extended its lead to 17 points, 20-3, after Gostkowski connected a school-record 53-yard field goal at the 10:45 mark of the third quarter.
Marshall's second drive of the third quarter saw junior college transfer Derek Devine replacing Skinner under center. However, the result was the same as the Herd were forced to punt after a three-and-out. Skinner replaced Devine on the Herd's next possession.
Following a Skinner fumble inside the five minute mark of the third quarter, Gostkowski made his third field goal of the afternoon - a 43-yard effort - to extend the Tigers' lead to 23-3. Gostkowski's field goal was the 66th of his career, tying a Conference USA record.
At the 8:05 mark of the fourth quarter, Gostkowski made his fourth field goal of the game, giving Memphis the deciding 26-3 score. Gostkowski's 42-yard effort was his fourth kick of the day of 40 yards or more.