The accused, identified as Sachin Singh Ambedkar and Rahul Gautam, had made the controversial posts on May 5 in the wake of the clashes in Shabbirpur village, Senior Superintendent of Police Subhash Chand Dubey said.
The posts were made to spread rumours and disrupt communal harmony, he said.
The cyber crime department of the city police tracked down the suspects after which a case was filed against them and they were held, the SSP said.
Sachin is a resident of Ghaziabad, while Rahul is from the city itself, Dubey said.