According to the wikipedia page list of riots in India, the first riot involving Hindus and Muslims occured in the 1881. That riot is titled as "The Salem riots of 1882". This riot has its own wiki entry which says:
The Salem riots of 1882 is a term used to refer to serious Hindu-Muslim disturbances which took place in the city of Salem, Tamil Nadu in the then Madras Presidency in August 1882.
The cause of Salem riots according to wikipedia,
The riots are believed to have originated by the objection of Hindus to the construction of a mosque by the Muslims of the Sevvoypettai area of the city of Salem on the path of a Hindu religious procession.
[Note: I disagree a bit with the above quote. The riot was instigated by nationalist Hindus which should be specified. Labelling them as "Hindus" may offend the people of Hindu community.]
The wiki page further says:
Full-scale riots erupted in August 1882. For three days, the British government had no authority in Salem city. The mosque was pulled down and there was indiscriminate killing on both sides.1 Eventually, peace was restored. Large number of alleged suspects were arrested, speedily convicted and given harsh imprisonment terms at the Andaman Cellular Jail.
The aftermath of the riots according the wiki page,
The atmosphere continued to remain tense till 1884. The police
arrested a large number of Indian nationalists accusing them of
instigating the violence. The partisan behaviour of the Madras
government and Governor's handling of the situation were sharply
criticized by the Indian media. Indian nationalist newspaper The Hindu
criticised the administration thus:
... the prosecution of the so called Salem Rioters and their
convictions were the result of a premeditated design, hastily formed
and executed in a vindictive spirit, not very honourable and utterly
unworthy of a civilised Government....
In simple words, the Muslims wanted to build a mosque near a Hindu possession and Hindu nationalists objected. When the mosque was built or partially erected, some Hindu nationalists attacked and crushed it. This initiated the communal riots that affected the both communities. Before the riots, British divide and rule policy was responsible for making the two communities dislike each other.