The politician - Rashid Ahmed - said he did it in protest against a ban on serving beef in the state. Opposition leader Omar Abdullah led a walkout, asking afterwards: "Do I assault everyone who eats pork or alcohol?"
Rashid Ahmed was kicked and punched before being rescued by opposition MPs. India's majority Hindu population consider cows to be sacred.
Most Indian states have tightened laws banning the sale and consumption of beef and there has been an increase in violence against those accused of breaking the ban. Source: BBC
Why Indian Muslim man was lynched over beef rumours?
It was around 10.30pm on Monday night and the nine-member Akhlaq family had been preparing to go to bed after dinner.
Mohammad Akhlaq, a farm worker, was already asleep in a room next to his 22-year-old son, Danish, when a frenzied mob, wielding sticks, swords and cheap pistols burst into their home, accusing the family of having slaughtered a cow and consuming it.
"They came from everywhere. Over the walls, through the gate...They just barged into the house, shouting that we had slaughtered a cow," says his 75-year-old mother, Asghari Akhlaq.
"I asked them how can we bring a cow into the house without anyone seeing? We are the only Muslim family in this neighbourhood."
Some meat found in the fridge, that the family insists is mutton, was held to be proof.
Slaughter of cows is a sensitive issue in India as the animal is considered sacred by Hindus, who comprise 80% of the country's 1.2bn people.
Uttar Pradesh is among a number of Indian states who have tightened laws banning cow slaughter and the sale and consumption of beef.
The family's pleas of innocence fell on deaf ears. The mob was too large. Smashing their way into the house, they began dragging out members of the family, abusing and manhandling even the women.
A group of the attackers made their way into the room where Mr Akhlaq was asleep. They bashed his head with a sewing machine lying nearby and dragged him and Danish out of the house.
From that point the beating became even more brutal. Both Mr Akhlaq and Danish were beaten with bricks, kicked and stabbed repeatedly, his family members told the BBC.
Some of the family's immediate Hindu neighbours had tried to intervene, telling the mob to leave the family alone, but to no avail.
They then tried calling the police, but when they finally got there an hour later, it was too late. Mr Akhlaq was dead and Danish critically injured.
"We were completely taken by surprise. Although it is true that we are the only Muslim family here, we have been living here for four generations and had never faced any issues before," Mr Akhlaq's elder brother, 55-year-old Jameel Ahmed told the BBC.
Temple 'confusion'"It was only later that we got to know that an announcement that someone had slaughtered and eaten a cow had been made from the Hindu temple," his daughter Sajida told the AFP news agency.
Pankaj Kumar who owns a shop near the temple premises confirmed to the BBC that he had heard the announcement from the temple as he was preparing to eat his dinner.
"By the time I washed my hands, the mob had already converged on the house. There was nothing anyone could do," he said.
While everyone agrees that the announcement came from the temple, there seems to be confusion over who had made it.
Locals told the BBC that some unknown people had jumped into the temple and used the public address system, insisting that temple authorities had been "sick" and were therefore innocent.
The priest of the temple and his assistant have been taken in for questioning by police, and six people have already been arrested based on the testimony of the family. Another four men are absconding.
The arrests sparked further unrest. Protests against the police action soon turned violent with mobs setting fire to vehicles and vandalising shops nearby. Police had to resort to firing in the air to bring the situation under control. One person was injured.
The situation in the area was still tense on Tuesday and additional forces have been deployed from neighbouring areas. Curfew had not been imposed, but streets were deserted and shops remained shut.
"The situation is under control now" senior official Rajesh Kumar Yadav told the BBC. "We have made some arrests and are looking for those who are absconding."
The local political representative of the area Sapbir Gujjar said the attack seemed to be politically motivated with an eye on upcoming state assembly elections.
Mr Gujjar belongs to the regional Bahujan Samaj Party (BSP) party led by Dalit leader Mayawati, which is fiercely opposed to the ruling BJP that swept the state in last year's parliamentary elections.
"This has deliberately done by outside forces to polarise the community. There is no other explanation for why this family, who had been living here for so many years would suddenly be targeted. As the 2017 state elections get closer, these types of incidents will only increase," he said.
Meanwhile Mr Akhlaq's family say they no longer want to live in Dadri.
"We are still in shock that people we lived alongside for so long would do this to us. I just want to take my sisters and mother and move away from here," Mr Mohammed's eldest son Sartaj who was in Chennai when the attack took place told the BBC.
"There is no place here for us now", his uncle agrees. "Already they have killed my brother. Who knows what will happen next?"
Indian Prime Minister Narendra Modi has broken his silence over the mob killing of a Muslim man rumoured to have eaten beef.
Hindus and Muslims should fight poverty and not each other, he told a campaign rally in Bihar.
Mr Modi had been under pressure to condemn the killing of Mohammad Akhlaq, who was beaten to death last month.
Hindus consider cows sacred and slaughtering the animals is banned in many states.
Mr Modi's government wants a nationwide ban, but beef is consumed by Muslims and other religious minorities in India.
The prime minister said Indians should ignore "irresponsible" statements by politicians - including ones made by himself - and work together.
"Hindus should decide whether to fight Muslims or poverty. Muslims have to decide whether to fight Hindus or poverty.
"Both need to fight poverty together.... The country has to stay united," he said.
But his comments come on the same day that members of Mr Modi's BJP party beat a Muslim politician in the Kashmir state assembly after he served beef at a private party.
The politician - Rashid Ahmed - said he did it in protest against a ban on serving beef in the state.
Opposition leader Omar Abdullah led a walkout, asking afterwards: "Do I assault everyone who eats pork or alcohol?"