Joe Torre ended his stint as the Dodgers' manager with a victory thanks to Lilly (10-12), who fanned nine and walked two.
Los Angeles finished the year with wins in five of its last six games to post an 80-82 record.
Torre announced last month he would leave the team at the end of the year and that hitting coach Don Mattingly would take over as skipper. He compiled a 259-227 mark over three seasons, winning two National League West crowns in the process.
Diamondbacks starter Rodrigo Lopez (7-16) gave up two runs on three hits over five innings.
Arizona (65-97) lost five of six to close out the season.
Ray Liotta sues skin care company over use of likeness
Aaron Carter is still in love with Hilary Duff