LONDON (AP) _ The peaceful revolution that swept away Communist rule in Czechoslovakia six months ago was engineered jointly by leaders of the secret police in Moscow and Prague, the British Broadcasting Corp. reported.

In Prague today, police chief major Pavel Hoffman said secret police headquarters have been put under special protection after a heated debate of seveal dismissed agents ended up in personal threats.

A BBC television documentary contends that secret police leaders in both the Soviet Union and Czechoslovakia conspired to bring down the hard-line Communist leadership in Prague because it rejected Mikhail S. Gorbachev's reforms in the Soviet Union.

The plotters planned for more reform-minded Communists to replace the hard- liners but miscalculated the depth of public desire for change, said John Simpson, the BBC foreign affairs editor.

Milan Hulik, an investigator for the Czechoslovak parliamentary commission probing the plot, told the BBC it was not yet known if the revolution was instigated by the Czechoslovak secret police or the Soviet KGB.

''But all the facts point to KGB connivance,'' he said. ''We cannot reach any conclusion other than that the whole affair had been given the blessing of the Soviet political leadership.''

The plotters on the Czechoslovak side are now under investigation and some are in prison, charged with misusing their positions as public officials, while a parliamentary inquiry into the plot continues, Simpson said.

The 50-minute news program, ''Czech-Mate: Inside the Revolution,'' was broadcast on BBC-TV late Wednesday.

The Gorbachev administration has also been reported to have had a hand in the nearly concurrent fall of Erich Honecker, the former East German Communist leader who had resisted implimenting Soviet-style reforms.

Simpson said the spark that ignited the Czechoslovak plot was the erroneous report of a death of a youthful demonstrator during an officially sanctioned march in Prague on Nov. 17. The demonstration marked the 50th anniversary of the murder of a Prague student by Nazi troops in 1939.

The plotters believed a death during the November commemoration ''would provoke a hostile reaction,'' Simpson said.

According to the BBC report, several thousand young demonstrators were lured into a narrow street leading to Wenceslas Square by Lt. Ludek Zivcak, a secret policeman who had infiltrated the student movement.

The documentary showed a photograph of Zivcak apparently urging the marchers to take the narrow street which had not been part of the original route of the demonstration.

Once in the street, marchers were hemmed in by police and brutally beaten. About 560 people were injured.

Zivcak fell to the ground, his body was covered with a blanket and an unmarked ambulance took the body away. The event sparked rumors that riot police had beaten to death a student named Martin Smid.

In the days that followed, people poured into Wenceslas Square in the heart of the capital to mourn the death and the protests grew.

Demonstrations continued even after the only two students named Martin Smid at Prague University were shown to be alive.

The mass protests finally brought about the downfall of hard-line President Gustav Husak's government, the creation of Czechoslovakia's first non- Communist government in four decades and the election to the presidency of playwright Vaclav Havel, the country's best-known opposition figure.

Simpson said the chief plotters were the Cezchoslovak secret police chief, General Alois Lorenc; the KGB head in Prague, General Teslenko (first name unavailable), and KGB deputy chairman General Viktor Grushko.

He said they monitored the Nov. 17 demonstration together in Prague and Grushko returned to Moscow the next day.

The plotters' candidate to replace Communist Party chief Milos Jakes was Zdenek Mlynar, who had been a leading figure in Alexander Dubcek's doomed reform government in 1968.

Mlynar, a friend of Gorbachev when they were law school students together in Moscow, had been purged by his own Communist leaders in 1969.

But Mlynar did not want the job when it was proposed to him and Havel and his non-Communist Civic Forum were ushered into power by popular acclaim.