The Cougars (3-3) also got 13 points from Jordan Railey in stopping a three-game losing streak.
"A great win for our program," Washington State coach Ken Bone said. "We really needed a win. Not only did we win, but I'm really excited the way we handled things down the stretch."
Terone Johnson had 16 points for Purdue (5-2), which was coming off a 97-87 loss Thursday to No. 5 Oklahoma State in which the Boilermakers rallied from a 24-point deficit to get within four with 3:16 to play.
Purdue coach Matt Painter met with his players for about an hour after the game in the locker room.
"At halftime, we talked about playing like we were 10 down instead of 10 up," said Painter. Purdue led 27-17 at the half. "Playing with a chip on our shoulder like we did when we played Oklahoma State. They jumped on us and grabbed the momentum pretty quick."
Purdue entered the game averaging 86.3 points.
"It was a great defensive effort," Bone said. "That's what I'm most proud of, personally. That's a great team. They have a lot of firepower."
D.J. Shelton had a pair of 3's to key a second-half opening 14-2 run that put Washington State up 31-29 with 16 minutes left. Lacy's 3-pointer gave the Cougars a 49-44 advantage 13 minutes into the half.
"They started knocking down shots and playing together as a team," Purdue guard Bryson Scott said of Washington State. "We still could have stopped it, but we didn't do a good job on defense as a team. We forced a lot of shots that allowed them to keep that momentum."
Shelton finished with 12 points.
The Washington State advantage grew to 11, at 59-48, when Railey had a three-point play and then had an assist on Dexter Kernich-Drew's layup with 2 1/2 minutes left.
The Cougars made just 6 of 27 shots (22.2 percent) during the opening half. They went 19 of 29 (65.5 percent) in the second.
"We didn't put our heads down," Lacy said. "We knew we were getting good shots. We just weren't making them. I think we came out in the second half and shared the ball a lot more. Also, we were attacking."