The mother of two was attacked by a man reportedly shouting “Britain first” at lunchtime in Birstall, West Yorkshire.
Labour leader Jeremy Corbyn said the country would be “in shock at the horrific murder” of the MP, who was a “much-loved colleague”.
The alleged gunman was named locally as Tommy Mair, 52, who neighbours in Birstall described as “a loner”.
Temporary chief constable for West Yorkshire Dee Collins
said: “Jo was attacked by a man who inflicted serious and sadly, ultimately fatal injuries. Subsequently there was a further attack on a 77-year-old man nearby who has sustained injuries that are non-life threatening.”
She added: “This is a very significant investigation with a large number of witnesses being spoken to at this time. It’s a large and significant crime scene and a large police presence with a full investigation is under way to establish the motive for this attack.”
Ms Collins said a man was arrested nearby by police, and weapons, including a firearm, were recovered.
The murder shocked Westminster and led to the suspension of campaigning in the EU referendum.
Prime minister David Cameron said: “The death of Jo Cox is a tragedy. She was a committed and caring MP. My thoughts are with her husband Brendan and her two young children.”
Home secretary Theresa May said it was a “dreadful event” adding Westminster had lost one of its “brightest and most popular” MPs.
Witness Clarke Rothwell, who runs a cafe near the murder scene, described the attack, telling the Press Association: “He was shouting ‘put Britain first’. He shouted it about two or three times. He said it before he shot her and after he shot her.”
He said the gunman fired three shots, the final one at her head.
Britain First is the name of a far-Right group which said it was “not involved and would never encourage behaviour of this sort”.
Another witness, Hichem Ben Abdallah said the alleged attacker was “kicking her as she was lying on the floor”.
He said that after a bystander intervened, the man produced a gun, stepped back and shot Ms Cox.
The 56-year-old, who was in the cafe next door to the library said: “There was a guy who was being very brave and another guy with a white baseball cap who he was trying to control and the man in the baseball cap suddenly pulled a gun from his bag.
“He was fighting with her and wrestling with her and then the gun went off twice.”
He added: “I came and saw her bleeding on the floor.”
Ms Cox was elected to the seat of Batley and Spen at the last general election in 2015.
She was a Remain supporter in the referendum.
Shortly after the attack, her husband Tweeted a picture of her next to the River Thames, where they lived in a houseboat.
Mr Cox, a former advisor to former prime minister Gordon Brown, spent Wednesday campaigning for the UK to remain in the EU.
He posted photographs of himself and the couple’s two young children travelling along the Thames in a dinghy during a counter -protest against a pro-Brexit flotilla of vessels.
West Yorkshire police and crime commissioner Mark Burns-Williamson branded the attack as “shocking” and “senseless”.
We cannot ‘be intimidated from doing our job’
The shooting of Labour’s Jo Cox is not the first time an MP has been attacked in their constituency.
Liberal Democrat peer Nigel Jones was attacked in 2000 during a constituency surgery when he was an MP.
Mr Jones was wounded and his aide, Andrew Pennington, was stabbed to death in a sword attack at the party’s office in Cheltenham, Gloucestershire.
Meanwhile, Labour MP Stephen Timms was stabbed twice in the stomach in 2010 by a woman who tried to murder him for voting for the Iraq war.
Tory whip Gavin Barwell was threatened last week outside his constituency office in Croydon.
He said meeting people in unsecured locations was part of an MP’s job. To “lock them away” from the public would be a terrible thing for democracy, he said.
“It is an unavoidable part of the job that we meet constituents in lots of unsecured locations — on the streets, fairs, meetings. Unless you sort of lock MPs away from the public, which would be a terrible thing for our democracy, you can’t remove the threat unfortunately. All you can do is take sensible advice and make sure your office is as safe as possible.”
Shadow policing minister Jack Dromey told BBC News: “We’ve had in the past serious attacks on MPs, for example my dear friend Stephen, and then additional security measures were taken, and I think fresh security guidance might now be necessary at the next stages. But that is for the next stages. For today our thoughts are with Jo.”
Mr Dromey said he intended to continue with his planned surgeries. He said: “The very last thing that can happen is for us to be intimidated from doing our job. The public expect us to be out there on their behalf.
“I have got a surgery — one on Friday, one on Saturday — and I will be there and of course we are talking to the local police about any sensible security measures that might be taken, but what we cannot allow to happen is for savagery of this kind to stop the democratic process of members of parliament doing their job because that is what the people expect.”
Mr Jones said: “Due process of law should be allowed to proceed without hindrance. MPs do a difficult and sometimes dangerous job.”