Matz, who is 0-4 with an ERA of 9.00, will move to the bullpen, and Edwin Diaz will become the closer.
Manager Luis Rojas decided to make the switch before Wednesday's game against Miami.
"Seth has been a starter for us in the past," Rojas said. "He's a guy who is ready for any kind of challenge with his versatility."
Lugo was one of baseball's best, most durable relievers in 2019, compiling a 2.70 ERA while covering 80 innings over 61 appearances.
He has repeatedly expressed a preference for starting and had some success in the role in 2017. New York considered converting Lugo back to the rotation over the offseason but instead added free agents Rick Porcello and Michael Wacha.
The bullpen struggled without Lugo on Wednesday, allowing three runs to blow a lead before Michael Conforto hit a two-run homer in the ninth to give New York a 5-3 win.
Diaz walked in a run in the eighth but pitched a perfect ninth with three strikeouts for the victory. He has a 2.53 ERA and one save and said he embraces returning to the role of closer, where he struggled last year.
"I feel like I've been ready since spring training," Diaz said through a translator. "I'm ready to pitch in whatever situation they need me."