FIFA said the sanctions, which include a further game behind closed doors which has been suspended, were imposed on the Hungarian Football Federation (MLSZ) "in relation to the racist behaviour of numerous supporters" during the game at the Puskas Arena in Budapest, which England won 4-0.
FIFA said in a statement: "After analysing.....all the circumstances of the case, specifically the seriousness of the incidents (racist words and actions, throwing of objects, lighting of fireworks, blocked stairways), the (Disciplinary) Committee decided that the MLSZ would play its next two home matches in FIFA competitions without spectators, the second match being suspended for a probationary period of two years."
MLSZ was not immediately available for comment.
During the game, Hungarian fans threw plastic cups towards England players and a flare landed on the field.
Footage was shown of one fan making a monkey gesture in the stands at the Puskas Arena and other individuals were seen behaving similarly.
Hungary's next qualifier is against Albania on Oct. 9.
They will also have to play their next two games in UEFA competition behind closed doors after a UEFA sanction for "discriminatory behaviour" by fans was imposed in July following incidents during the team's Euro 2020 games at the Puskas Arena.