Unmarked Portuguese midfielder Cristovao Ramos scored the winner five minutes after the break when he gave CSKA's Algeria keeper Rais M'Bolhi no chance with a precise shot from close range.
"Levski didn't outplay us in any department," CSKA coach Stoycho Mladenov told reporters. "God helped them today and that's why they won, they're very, very lucky.
"And I don't want this referee (Nikolay Yordanov) to officiate CSKA games anymore... I knew he'd create problems."
CSKA, searching for their 32nd league title, top the standings with 63 points from 26 matches followed by surprise packages Ludogorets on 58. Levski moved up to fourth on 53 points.
The heavily-policed "Eternal derby", as matches between the two most popular clubs in the Balkan country are known, has often been bad tempered with hooliganism rife.
Some 1,000 police officers were on duty to prevent public order offences before, during and after the match at the Vasil Levski national stadium. (Reporting by Angel Krasimirov, editing by Mark Meadows)
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.