Six years after retirement from his club career, he was named as Taj's head coach in 1966. After good results with the team, he was appointed as head coach of the Iran national football team in 1967 and led the team in the 1968 AFC Asian Cup in which Iran won the title without any loss or draw. He resigned after the tournaments in protest to the then President of Iran Football Federation and was succeeded by Zdravko Rajkov. He returned to the national team after four years and was re-appointed as head coach in 1972 after the resignation of Mohammad Ranjbar. Bayati led the team in the 1972 Summer Olympics with bad results and was unable to be qualified to the 1974 FIFA World Cup. He was sacked as national football team head coach in 1974.