Aisha Ali-Khan, 34, had already pleaded guilty to encouraging Mohammed Afiz Khan, 46, to obtain personal data relating to people she believed had sent emails on or about August 24 2012.
Ali-Khan, who worked with the Respect MP for Bradford West, had asked Khan, then a detective inspector with the Metropolitan Police's counter-terrorism unit SO15, for help in finding out about some offensive material on the internet.
The couple, of Keighley, West Yorkshire, listened quietly side-by-side in the dock in London's Southwark Crown Court as the Recorder of Westminster Alastair McCreath sentenced them.
He told Ali-Khan: "I accept that your criminality arises in circumstances where you were offended, and justifiably so, by someone putting material on the internet that was offensive to you.
"The request was unlawful. Whilst what you did was against the law, the request was understandable and led to nothing. Punishment as such is inappropriate - you must behave yourself for the next 12 months when this will be discharged."
Khan, who had already pleaded guilty to two misconduct charges, was given a six month jail sentence suspended for two years and ordered to pay £500 costs.
He was suspended from the Metropolitan Police after being charged in July last year and has been sacked.
In December he pleaded guilty to a charge of misconduct in that he disclosed restricted information he had obtained relating to the arrest of radical Muslim cleric Anjem Choudary to Ali-Khan while she was employed by Mr Galloway on or around May 22, 2012.
He also admitted a charge of misconduct relating to obtaining CCTV from South Yorkshire Police that he had no authority or good reason to obtain between March 16 and April 30, 2012.
The judge told him that as a senior police officer he had committed "a serious crime as a trusted member of an important arm of society".
The judge, who accepted Khan's shame and remorse over what happened, said he had acted "for private purposes to do with jealousy and uncertainty about your relationship and things of that kind".
He said that Khan had passed over information that was not yet in the public domain and that he had abused his position as a senior police officer. The judge also noted Khan had not tried to make money from his crimes.
Prosecutor Martin Scott had earlier suggested that the information regarding Choudary may have been to help create some distance from him.
The judge said there is nothing "which casts aspersions of any nature on Mr Galloway".
He said: "The object of Mr Khan to gain this information was to assist Ms Ali-Khan and that she might be able to bolster her position as Mr Galloway's assistant."
Caroline Haughey, defending Khan, told the court that Khan felt "enormous shame" in having thrown away a 25-year career in a job that he "worshipped".
She said: "He feels he has betrayed the Metropolitan Police Service, the police generally, the public, his family and the community by his stupidity.
"These offences were motivated by his heart rather than his head."
Ms Haughey added that he felt "great shame and sadness" that his father had died watching his downfall.
She added: "There was no financial gain. He has lost his job, lost his pension and lost his self-respect. The only gain from it was to his own jealous mind. It was an ego trip by him and his partner."