Cody Cousins, who is believed to have targeted Andrew Boldt inside the Electrical Engineering Building, surrendered to a police officer within minutes of the attack, Purdue Police Chief John Cox said.
Investigators were trying to determine a motive for the shooting, which happened around noon on the campus in West Lafayette, about 60 miles northwest of Indianapolis. No one else was injured.
"This appears to be an isolated and intentional act," Cox said.
Boldt, a 21-year-old senior and teaching assistant from West Bend, Wis., died at the scene. Cousins, 23, who according to police has addresses listed both in Warsaw, Ind., and Centerville, Ohio, was being held on a preliminary charge of murder Tuesday night at the Tippecanoe County Jail.
Students described a chaotic scene on the campus. Sophomore Nick Wieland told the Journal & Courier that he was in a basement classroom adjacent to the one where the shooting occurred.
"I heard a couple (shots) and then I heard a man scream," Wieland said. "Then the last few kind of trailed off as I got under my desk. . (I was) just very scared. That's what I felt the entire time."
Julissa Martinez, a freshman in nursing, told The Associated Press that she was in a psychology class on another part of the campus when she received the text alert from university officials telling students to seek shelter.
She said her professor briefly kept teaching, then stopped lecturing so that students could contact people to let them know they were safe.
"He tried to get everything under control because people were freaking out," Martinez said, adding that students were nervous because there was a lot of speculation about the severity of the situation.
The shooting was reported at 12:03 p.m. and Purdue officials issued the campuswide text alert shortly afterward. Cousins was taken into custody outside the engineering building within minutes of the shooting.
Around 1:15 p.m., the university texted students a message telling them there was no ongoing threat on campus and that normal operations would resume in all buildings except the engineering facility.
But the university later announced that classes were being suspended through Wednesday. A candlelight vigil was planned for Tuesday night, with special counseling services being offered to students at several sites around campus.
Purdue Provost Tim Sands said the university's president, Mitch Daniels, was on a weeklong school trip to Colombia but will be cutting his travel short. He was expected to return to campus Wednesday.
Sands, who in June will become president of Virginia Tech, where a 2007 campus shooting left 33 dead, said Purdue will offer assistance to those who need it as the circumstances of Tuesday's shooting unfold.
"We'll provide whatever services we can to assist our students, our faculty and our staff in coming back to a sense of normality," he said.
Boldt was an Eagle Scout who graduated in 2010 from Marquette University High School, a Jesuit school in Milwaukee. He spent two summers interning for John Deere in Silvis, Ill., according to his LinkedIn profile.
Family members of Boldt could not be reached for comment Tuesday night. Relatives of Cousins also could not be reached.
James Greenwald, a retired Latin teacher who taught Boldt for two years in high school, remembered his former student as bright, inquisitive and always willing to help.
"He was very capable in math, computers, robotics," Greenwald told the AP. "He was a very capable student and an even better person."