The Yankees made the moves before Wednesday night's game in Seattle. Righty Matt Daley was optioned to Triple-A and left-hander Wade LeBlanc was designated for assignment. San Francisco received cash for Huff.
Kelley had been out since early May because of a back strain. He has a 3.52 ERA in 16 games, working mostly in the eighth inning.
The Giants designated Huff for assignment June 6. He was 1-0 with a 6.30 ERA in 16 appearances.
Huff pitched 11 times for the Yankees last year. He was sent to San Francisco in January for cash after the Yankees signed Masahiro Tanaka. Yankees manager Joe Girardi says he likes adding Huff because he's familiar with him.
Daley appeared in 12 games and had a 4.85 ERA.