Labour legislator Jo Cox was attacked just before 1 p.m. in Birstall, northern England, Acting Chief Constable Dee Collins of West Yorkshire Police said. She was pronounced dead by a doctor less than an hour later.
A 77-year-old man was injured.
A 52-year-old man has been arrested and Collins said police believe it is a "lone incident" and are not looking for anyone else in connection with the attack.
Labour leader Jeremy Corbyn said "the whole of the Labour Party and Labour family - and indeed the whole country - will be in shock at the horrific murder of Jo Cox today."
Both the Vote Leave and Britain Stronger in Europe campaigns suspended activity ahead of next week's vote over whether Britain should remain a part of the 28-member bloc at the news.
Violence against politicians is rare in Britain, as are gun attacks, and figures from all parts of the political spectrum expressed deep shock.
Prime Minister David Cameron said he was cancelling a planned speech in Gibraltar after "the terrible attack."
"Our thoughts and prayers are with Jo and her family," Cameron tweeted.
The rival sides in the referendum have been canvassing feverishly ahead of what is expected to be a close vote and Cox had been campaigning for the "remain" camp.
It wasn't clear if the attack on her was linked to the EU debate.
Britain's Press Association news agency quoted eyewitness Hithem Ben Abdallah as saying Cox got involved in a scuffle between two men in Birstall, 200 miles (320 kilometres) north of London.
Abdallah said one of the men was fighting with Cox and then a gun went off twice and "she fell between two cars and I came and saw her bleeding on the floor."
Clarke Rothwell, who runs a nearby cafe, told the BBC he believed Cox had been shot and stabbed multiple times.
"Three times she was shot, the initial time which then she dropped to the floor and two more times," he said. "The third time he got close proximity he shot her around the head area."
"In the meantime he was stabbing her as well. He was stabbing her with his knife."
Shopkeeper Sanjeev Kumar told the BBC said he saw a woman lying on the ground "bleeding from the mouth and nose," with two women trying to help her.
After around 15 minutes, witnesses said emergency services arrived and tended to her with a drip.
Cox, a former worker for charities who is married with two young children, was elected to the House of Commons in the May 2015 general election.
She has been one of the most outspoken lawmakers on the subject of the Syrian civil war, and has been critical of Britain's reluctance to deepen its military involvement against the Islamic State group as part of efforts to end it.
In the past two decades, two other British lawmakers have been attacked during their "surgeries," regular meetings where constituents can present concerns and complaints.
A Labour legislator was stabbed in the stomach and injured in May 2010 by a female student radicalized by online sermons from an al Qaeda-linked preacher.
In 2000, Liberal Democrat lawmaker Nigel Jones and his aide Andrew Pennington were attacked by a man wielding a sword during such a meeting. Pennington was killed and Jones injured in the attack in Cheltenham, England.