Yes, that is perfectly legal: unless there is a written employment contract (including a union agreement; see below), employment is employment at will; that means, among other things, that employers are not obligated to employ, or retain in employment, any one; it is completely voluntary on the part of employers to employ anyone. Since it is voluntary to employ someone, an employer may set any terms or conditions it likes on employment; those terms and conditions may include no outside work (or no outside work for certain other employers). The employer may fire anyone who violates its terms or conditions such as, in this case, working for another police department. An employee who does not wish to work under those terms or conditions may seek other employment.However, if there is a written employment contract, including a union or collective bargaining agreement, the employer may not do anything which violates or contradicts the contract; review any such contracts to see their effect, if any, on this situation.