Lokomotiv jumped into the third spot of the league's table with 60 points from 35 matches, ten points behind the leaders Zenit St. Petersburg. Anzhi sit seventh on 56 points.
"It was an interesting match of two equal opponents," said Lokomotiv's Portuguese coach Jose Couceiro. "We all knew that we should play at our best to win today. Luckily, my players managed to perform at maximum concentration throughout the match and win."
Lokomotiv, who desperately needed to win to leapfrog city rivals Dinamo and Spartak, started lively by trying to expose Anzhi's defensive weaknesses.
The visitors defended well but in the 22nd minute Lokomotiv midfielder Magomed Ozdoev breached their defence, though his shot from the edge of the box went just inches wide of the left post.
Anzhi replied with a powerful shot by Cameroon star striker Samuel Eto'o just outside the Lokomotiv box in the 40th minute but Lokomotiv goalkeeper Marinato Guilherme was equal to the strike.
Lokomotiv midfielder Denis Glushakov put his side into the lead in the 73rd minute, when he received Felipe Caicedo's cross from the right to the edge of the area and sent the ball home past Anzhi keeper Vladimir Gabulov.
Three minutes later, Anzhi left winger Yury Zhirkov missed a clear chance to level the scores with a header from just outside the six-yard box but Guilherme parried it out of danger.
"Both teams were playing well tonight but the result for us was negative," Hiddink said after the match. "I'm satisfied with my team's playing before and after the break but even a good performance without a positive result doesn't add points to our balance."
Kuban claim points
In the other top-eight group matches, Kuban Krasnodar beat two-time champions Rubin Kazan 1-0. Brazilian-born Armenia striker Marcos Pizzelli, who played his first match for Kuban, was the hero, scoring the hosts' winning goal two minutes before half-time.
"It's the best possible debut. My team won while I scored. I just couldn't imagine that," Pizzelli said afterwards.