The Boys in Blue (1970) by Samuel Steward writing as Phil Andros.
For the main article on the Phil Andros Novels and Stories, click here.
This one starts in Santa Monica, where I grew up. Phil is visiting his sister and brother-in-law for Christmas when he picks up a cop directing traffic near the outdoor mall that I remember very well, now called the Third Street Promenade. Phil returns home to San Francisco, but the cop, Greg Wolfson, smitten with him, decides to move up to San Francisco to join him. Phil rents a place for them both, then realizes that it isn’t going to work for a hustler to share an apartment with a cop, so he decides to go legit and gets a job with the San Francisco police as well. Then, while he’s at the police station applying, he picks up another gay cop Pete, and invites Pete to take the second bedroom of the apartment and share the rent. Soon the three are indulging in a happy menage a trois. This one’s even more like a novel. There’s a little police work: they investigate a suicide; and then Phil is kidnapped by some thugs who recognize him from his hustling, but he’s rescued by Greg. Phil has a little extra-curricular sex with a guy who has a thing for cops. But the fun won’t last. The guys who kidnapped Phil are coming up for trial and they’re going to accuse Phil of being a well-known hustler. Phil’s supervisor tells him that they can’t substantiate the claim but even the accusation is going to look bad for the force. So Phil is out. He finds another gay cop, Ray, to take his place in the apartment. Then Phil goes to Chicago and rooms with a guy we met earlier, Rudolf Dax (Stud, Chapter 10). They both get jobs on the Chicago police force. The novel ends with the news that Ray, the new gay cop Phil had recruited to replace him as a roommate, brought home a guy who was a plant from the cops and uncovered a gay orgy resulting in the three cops: Greg, Pete, and Ray, all being expelled from the force.