New York Police Department spokesman Paul Browne says the suspect was killed in a passenger dropoff area at the Marriott Marquis hotel.
The hotel is located in the Broadway theater district and near the heart of Times Square.
The shooting happened in a very busy area, filled with shoppers and tourists, near West 46th Street and Broadway just before 11:30 a.m.
According to officials, an officer was dealing with illegal peddlers in Times Square.
Sgt. Christopher Newsom asked them for their tax identification, which allows peddlers to sell on the streets.
Instead of complying, one of the men, Raymond Martinez, took off running, through to the Marriott Marquis hotel's passenger drop-off area.
Newsom pursued, and Martinez turned and fired with a Mac-10 9mm machine pistol that held 30 rounds; he got off two shots before it jammed, police said.
"I saw the tall guy shooting and drop the young guy within 20 feet, and then there were a couple more shots," one tourist said. "My wife ran into a shop out of the way. I was shocked and curious. I was just rooted."
Two of the suspect's bullets shattered the windows of nearby shops.
Newsom fired back four times, striking the Martinez in the chest and arms.
He was rushed to Roosevelt Hospital where he was later pronounced dead.
. Martinez, a 25-year-old from the Bronx, had been wanted for assault, but the officer approached him because he was recognized as an aggressive panhandler, authorities said. There were 27 live rounds left in his gun recovered at the scene, authorities said.
Newsom was not wounded, but was being treated for trauma. He was assigned to an Operation Impact zone in the Midtown South Precinct.
Investigators said the Mac 10 was reported stolen in Richmond, Virginia back in October.
"Potentially, if the gun had been functioning properly, he could have fired a total of 30 rounds," said Police Commissioner Raymond Kelly.
In the suspect's clothing, Kelly said they found a business card from a gun shop in Virginia.
"Hand written on the back of that business card are words to the effect 'I pity the cop who has the nerve to put me in a paddy wagon,'" Kelly said.
According to police, the message apparently references the 1985 martial arts movie, The Last Dragon.
"I want to know why that cop did not shoot him in the leg or something to stop him, but not in his heart," his mother Ancela Martinez told Eyewitness News reporter Jeff Pegues after her meeting with detectives.
Martinez said her son was a father and aspiring rapper. She said her son had a license to sell his CDs, but she could not explain why he had a gun or what was written on the business card found in his pocket.
Police say Martinez and his brother, who was taken into in custody and later released, were working a scam in which they would approach tourists, ask them their names, then write the names on the CDs and demand payment of $10. They claim the CDs are original work they've created, but it's unclear if that's true. They had already been given a summons by officers this year for not having identification.
So far this year, police said there have been more than 400 arrests involving illegal and licensed peddlers around Times Square.