David Blackmer, 44, was arrested and placed on paid administrative leave in July 2013 after the woman complained to Seattle Police Department professional conduct officials, initiating an investigation.
He pleaded guilty to cyberstalking in December.
Blackmer, an Everett resident, was sentenced in Snohomish County Superior Court. He received 364 days in jail with 274 of those suspended, as well as five years' probation.
Though the prosecutor asked that Blackmer be barred from possessing a firearm, the judge did not include that restriction in the sentence.
Blackmer is also ordered to pay a $1,000 fine and undergo state-certified domestic violence treatment.
The detective reportedly began an affair in December 2012 that went sour when the woman discovered he was married.
After she confronted him and his wife at their Everett home, she discovered a Facebook profile created under her name with intimate photos posted of her, as well as her address and contact information.
The account became so detailed that she was afraid to go home, she told investigators.
A search warrant allowed detectives to discover that the account was linked to Blackmer.
Seattle Police Department spokesman Sean Whitcomb said Blackmer remains on paid leave. Now that the criminal process is complete, an internal investigation will begin, he said. The outcome of that investigation will determine Blackmer's employment status.