Los Angeles also received cash to cover part of what remains in Lilly's $12 million salary.
Third in the NL West, the Dodgers already acquired center fielder and leadoff man Scott Podsednik from Kansas City on Wednesday.
Lilly is 3-8 with a 3.69 ERA and hasn't won since June 13. He pitched 5 2-3 scoreless innings against Houston on Tuesday and has allowed four earned runs over his last 16 innings. He is eligible for free agency after the season.
Theriot has a .284 average with one homer and 21 RBIs.
The 24-year-old DeWitt, a first-round pick in the 2004 amateur draft, is batting .270 with 15 doubles, one homer and 30 RBIs.