Officers responding to reports of gunfire found the two and a handgun in an office on the fourth floor of Gould Hall, Assistant University Police Chief Ray Wittmier said.
The female victim, a 25-year-old university employee, had a restraining order against the man, who "almost certainly" shot her and took his own life, Wittmier said.
People who were inside the building at the time of the shooting told Chris Legeros of CBS affiliate KIRO-TV that they heard four or five loud bangs.
The only people involved were the woman and the man, who was in his 40s, Wittmier said. There were no eyewitnesses, he said.
Lance Nguyen, a researcher at the Runstad Center for Real Estate Research, which has offices on the building's fourth floor, said he was a co-worker of the woman and that she had said she was worried about her former boyfriend. The woman, a research specialist, changed her telephone number and e-mailed a photo of the man to friends, asking them to watch out for him, Nguyen said.
"She said it's a psycho from her past," Nguyen said.
King County Superior Court records show the woman was granted a temporary restraining order on March 6, after saying the man had threatened her, her sister and their dogs.
In applying for the order, she wrote that on Jan. 5, the man threw glass candlestick holders at her in a drunken rage, then tackled and punched her. The two were living together at the time.
"I forgave him because he was drunk but now I see that was wrong and he has threatened to hurt me again," she wrote, adding, "I cannot find him but he can find me."
She wrote that he called her in February and threatened suicide "because he couldn't see me. I never called him back."
Wittmier said campus police were not aware of the restraining order against the man. He also said he did not think the man had permission to carry a handgun on campus, where firearms are banned.
Student Meghan Pinch, 27, was in a first-floor classroom when she heard several loud bangs. She said she did not think they were gunshots at first but then police told everyone to evacuate.
"No one wanted to really think it was real," Pinch said as she waited outside to learn if the victims were people she knew.
"We all are pretty close in this building," she said.
Gould Hall, built in 1972, houses three architecture department offices, a dean's office, a library, shop, lab, computer facilities and classrooms, according to the university's Web site.
The building, in an urban neighborhood on the edge of the campus, was closed for the day with classes rescheduled elsewhere on campus.