Senegal will play Colombia while Japan play already-eliminated Poland.
Senegal will set up a last-16 date with either England or Belgium if they avoid defeat to Colombia on Thursday.
Both of the remaining sides will come from Group H and there are now three teams who are vying for that spot - Colombia, Japan and Senegal.
Japan received two fewer yellow cards (four) in the group stage, while Senegal had six yellow cards.
Jan Bednarek got the solitary goal of the match in the 59th minute when he beat his marker at the far post to volley in a swirling free-kick from Rafal Kurzawa.
Playing cleaner was the difference, and Japan will now face the victor of Group G, which will be either Belgium or England, in the round of 16 on Monday at 2 p.m. ET.
This marked the first time in World Cup history that a team progressed out of the group stage via their Fair Play record.
Senegal bowed out of the tournament despite having equal points with Japan. The next tiebreaker would be points earned in matches between the teams that are tied, but Japan and Senegal played to a 2-2 draw when they met in the group stage, so that was a wash as well.
Colombia, now sitting in third in the group, needs a win to advance and will need another inspired performance from midfielder James Rodriguez.
6 yellow cards to 4 yellow cards.
A win for Colombia, however, will see them qualify ahead of either Japan or Senegal.
While the fair play tiebreaker is far from ideal, it's likely better than what would have been the case had Senegal and Japan also been tied on yellow cards - the final remaining tiebreaker that Federation Internationale de Football Association has, in that case, is the drawing of lots.