Hot Fuzz
(2007)

Simon Pegg plays a successful London police officer named Nicholas Angel who is very focused on his work and is transferred into a small village out in the country because he's making the rest of the force look bad in comparison. The city's known for always winning the best village award and hasn't had a murder in years.

Soon after Angel moves to town there's a series of grisly accidents, which he thinks are murders and tries to solve while working with a bumbling slacker partner who's obessed with Bad Boys II and other cop action movies.

It turns out that instead of one killer there's a group of them, all members of the neighborhood watch alliance, intent on keeping the village free of anything that would ruin it's reputation and keep it from winning the yearly award. It's lead by the chief inspector, and they try to kill Angel. His partner seeks him out of town, but Angel comes back and there's a huge shoot-out session between the good cops and the neighborhood group.

After all the bad guys are arrested, the London police arrive and offer Angel his old job back, but he declines saying he likes the village.

Thanks ZRamek!