The 21-year-old left Pools for Posh in September 2014, having scored 22 goals in 99 appearances.
He has been limited to 34 games at London Road, scoring just two goals, and had been on loan at Bradford City, where he made four starts.
James is available for Saturday's trip to Notts County.
Find all the latest football transfers on our dedicated page.
Hartlepool United have re-signed forward Luke James from League One side Peterborough United on loan until the end of the season.