Army, police and intelligence officers were taking sides in the ruling Zanu-PF party's infighting over the battle to succeed him, he said.
Such factionalism was destructive, the 91-year-old leader said.
He made these remarks off the cuff to Zanu-PF's annual gathering, as he first began reading the wrong speech, before realising after about 30 seconds.
Mr Mugabe quickly recognised that the address was one he had given on Wednesday to the party's central committee.
In September at the opening of parliament, he read out a whole speech that he had given the previous month in a state-of-the-nation address.
Loyalties over the succession within Zanu-PF appear to be split between the president's wife Grace Mugabe and his deputy Emmerson Mnangagwa.
"We had come to a point where there were some in the military, the police and the intelligence services joining factions. Let's stop that," President Mugabe told thousands of party delegates in the tourist resort of Victoria Falls.
"Let's stop that completely, we are ruining the party that way."
Zanu-PF has always kept tight control of the security forces, and has been accused of using the military to attack opposition supporters during elections. Its officials have denied the charges.
During the five minutes he spoke before continuing with his correct speech, Mr Mugabe, who has been in power for 35 years, said that there would not be any leadership changes within the party.
The BBC's Brian Hungwe in Victoria Falls says there had been talk of replacing one of the two vice-presidents with Mrs Mugabe.
That this has not happened means Mr Mnangagwa's position is secure for another year, our reporter says.
Ahead of the Zanu-PF conference, Mrs Mugabe held rallies across the country, which many have seen as a  sign of her political ambitions.
The 50-year-old first lady took over the ruling party's women's league last year after spearheading the expulsion of former Vice-President Joice Mujuru and her supporters from Zanu-PF.
Mr Mnangagwa, 69, is a veteran of the independence struggle and Zanu-PF and also served as the country's spymaster in the 1980s.
Profile: Emmerson Mnangagwa
Profile: Grace Mugabe
Zimbabwe's President Robert Mugabe has warned the country's security services not to get involved in politics.