An answer on Islam.SE claims,
Ghulam Ahmad came out at a time when the British were trying to take over India, and they needed someone to stop the Muslims from fighting, and so bribed this man to assist them.
Wikipedia similarly states,
After his death, opponents accused him of working for the British Government due to the termination of armed Jihad, since his claims of being the Mahdi were made around the same time as the Mahdi of Sudan (Muhammad Ahmad).
But I haven't seen any actual evidence that Ghulam Ahmad was working for the British. Does such evidence exist? I also don't really understand the (unsourced) connection Wikipedia is making between the "termination of armed Jihad" and his claims being "made around the same time as the Mahdi of Sudan," so if answers could shed more light on that connection that would be cool as well.