The Grey's Anatomy star will appear in the HBO drama's season finale, with his role expected to recur if the series is picked up for a fifth run.
Foley will play Patrick, a former soldier who arrives in town to visit his old friend and comrade Terry (Todd Lowe).
The actor played Noel Crane in WB series Felicity between 1998 and 2002, and also starred in CBS action-drama The Unit. In addition, he has played recurring roles on Scrubs and Cougar Town.
Foley's True Blood role is not expected to clash with his ongoing commitment to Grey's Anatomy. He will shoot his guest role on the HBO series later this month, while Grey's does not resume production until July.
The fourth season of True Blood begins on Sunday at 9/8c on HBO.
> Stephen Moyer 'wants Sookie, Eric True Blood romance'
Watch a trailer for the fourth season of True Blood below: