As part of the plea deal, prosecutors agree to drop three other indictments that include obstructing justice and possession of cocaine. O'Mary agreed to repay the $97,976 he took from Durham County.
O'Mary was accused of pocketing money used by the sheriff's office to pay confidential informants and to buy drugs in undercover drug investigations.
He had been with the sheriff's office since November 4, 1991, rising through to ranks to a lieutenant supervising the Sheriff's Anti-Crime & Narcotics Unit.
Durham County Sheriff Worth Hill fired O'Mary on April 9, 2009 after the allegations surfaced.
O'Mary is facing up to 56 months in jail.