Brian Hayles was born in Portsmouth, Hampshire, England.
He wrote six stories for Doctor Who and is best known for his creation of the Celestial Toymaker in the 1966 story of the same name, the Ice Warriors, introduced in the 1967 story of the same name, and the feudal planet Peladon, the setting for The Curse of Peladon and its sequel The Monster of Peladon.
In addition to script writing for the radio series The Archers, Hayles penned a novel based on the soap called Spring at Brookfield (Tandem, 1975) set in the period between the two world wars. His other books included novelisations of his Doctor Who serials The Curse of Peladon (Target, 1974) and The Ice Warriors (Target, 1976), an adaptation of his scripts for the BBC drama The Moon Stallion (Mirror Books, 1978), and two horror plays for children, The Curse of the Labyrinth (Dobson, 1976) and Hour of the Werewolf (Dobson, 1976). An original novel entitled Goldhawk (NEL, 1979) was published posthumously.
Apart from Doctor Who, Hayles wrote for such television series as The Regiment, Barlow at Large, Doomwatch, Out of the Unknown, United!, Legend of Death, Public Eye, Z-Cars, BBC Playhouse, The Wednesday Thriller and Suspense. He also wrote the screenplays for the feature films Nothing But the Night (1972) and Warlords of Atlantis (1978). The novelisation of the latter by Paul Victor (Futura, 1978) included a preface by Hayles entitled 'The Thinking Behind Atlantis' in which he explained the origins of the film's central concepts.
Hayles's final screenplay was for Arabian Adventure (1979), which he completed shortly before his death in 1978. The novelisation of the film by Keith Miles (Mirror Books, 1979) was dedicated to his memory.