The police officers were obviously here just to frame him, which was not difficult at all since they did such things all the time.
The reason why the Yamen wanted to arrest Yuchi right now was that they had no way of doing anything to Yue Hanjiang.
When Yue Hanjiang had killed the person-in-charge of the police station, no one had noticed anything at first. However, Yue Hanjiang's cell had been sealed off from the inside using her Dao aura.
In other words...
There was no way to open the door of the jail unless their strength surpassed the Dao heart realm, or more specifically Yue Hanjiang's cultivation level. Only then would they be qualified to enter.