Mr Compaore issued a statement saying the presidency was now vacant and urging elections within 90 days.
Military chief Gen Honore Traore says he has taken over as head of state.
On Thursday, protesters angry at Mr Compaore’s attempt to amend the constitution set fire to parliament and government buildings.
Following the protests, Mr Compaore said he had agreed not to seek another term, but that he would remain in power until a transitional government had completed its work in 2015.
However, the opposition continued to demand that he resign. Its leader, Zephirin Diabre, urged protesters to occupy public spaces.
There were cheers when an army spokesman told the crowd gathered in front of army headquarters on Friday that Mr Compaore had left office, AFP news agency reports.
Mr Compaore’s statement, read on television, said there was now a “power vacuum” and called for “free and transparent” elections within 90 days.
His whereabouts now remain unclear.
Gen Traore has now said he has taken over.
Late on Thursday, he had announced the creation of the transitional government, declared the dissolution of parliament and imposed a night curfew.