Middlesex District Attorney spokesman Corey Welford said the man died early Tuesday at Beth Israel Deaconess Medical Center in Boston. He wasin the abdomen outside Kirkland House, an undergraduate dorm.
Harvard has said the man was not a student at the university. In a statement, the school said the shooting appeared to be "isolated."
No arrests had been made as of early Tuesday afternoon. Cambridge police are looking for several people they believe were involved.
Students inside Kirkland House were told to remain there for several hours as police interviewed potential witnesses. Harvard is in the midst of final exams.
The Middlesex district attorney's office told CBS Station WBZ in Boston that the shooting is now being treated as a homicide. They would not provide any information about the victim, who has only been described as "college age." He was not a Harvard student.
Police are searching for three men who were seen running away from vicinity of the Kirkland House after the victim was shot.
A law enforcement source told WBZ the suspects were not Harvard students.
After the shooting, an e-mail was sent to Harvard students by administrators informing them of the incident and asking them to cooperate with police and staff.
Kathleen Breeden, a senior at Harvard, was in the Kirkland House when the shooting happened. "I just heard three gun shots in quick succession. … We didn't really know what was going on. That was the tough part, then getting all these rumors," she told WBZ.