She was giving evidence earlier against Det Sgt Andrew Mottau, who denied gross misconduct while working as a South East Counter Terrorism Unit supervisor.
The woman said he used a key-ring sized black monkey to signal whose turn it was to make tea and coffee.
She said the toy was put on her desk in August when she came back from leave.
The investigator, whose name has not been released, said she felt "ridiculed" and as though other members of her team were laughing at her.
She and Det Sgt Mottau had known each other for more than 20 years, a misconduct hearing was told.
She said: "I'm a black person, serving the public. I was shocked and offended to see a black monkey on my desk.
"He was jeering [at] me and harassing me about the black monkey... I felt violated and grabbed my fags and walked out."
She added: "His actions have racist undertones. The toy remained on my desk for three weeks and it's unthinkable that no-one did anything... I raised an objection more than once."
"He bullied, harassed me and violated my dignity. It dented my confidence and I went home crying."
Det Sgt Mottau is also alleged to have told the woman to make him cups of tea "when the black monkey starts to sing".
Furthermore, he is accused of making racist remarks and asking her to "embrace" the monkey in the period between 15 August and 15 September 2016.
The misconduct hearing is being held at Thames Valley Police's Kidlington headquarters and is scheduled to last four days.
A black woman working for Thames Valley Police has said she felt "shocked and offended" when a colleague allegedly left a toy monkey on her desk.