Sassou Nguesso's government has accused Mokoko of involvement in an alleged coup attempt in 2007.
An opposition leader in Congo Republic, detained since June on charges of violating state security and illegally possessing weapons of war, was denied bail on Thursday by an appeal court in the capital Brazzaville, his lawyer said.
Jean-Marie Michel Mokoko, the former army chief and a power broker in the former French colony's 1990s civil war, finished third to long-serving President Denis Sassou Nguesso in a March election criticised by opposition parties and foreign powers for irregularities.
Sassou Nguesso's government has accused Mokoko of involvement in an alleged coup attempt in 2007. Mokoko's supporters say the president is trying to stifle dissent, a charge the government denies.
Mokoko's lawyer, Yvon Eric Ibouoanga, told Reuters the court's decision "lacked a legal basis". Additional charges of incitement of public disorder were also brought against Mokoko on Thursday, apparently in connection with his calls for civil disobedience after the election results were announced.
Sassou Nguesso, 72, has ruled the small oil-producing nation for 32 of the last 37 years. He successfully pushed through changes to the constitution last year that allowed him to stand for a third consecutive term, triggering violent protests that killed at least 18 people.
Another opposition leader, Paulin Makaya, was sentenced to two years in prison last month for his role in protests against the referendum on the third term.