Lee's departure comes after four years in the J-League, during which he scored 32 goals in 88 league appearances.
The Korean's 15 goals for Gamba last season saw him become the joint third highest scorer. The transfer to Ulsan will allow him to fulfill his mandatory two years of military service in South Korea.
"Thank you for always supporting me," Lee said through the club.
"For personal reasons I have decided to continue my career in Korea, but I will never forget my time with Gamba."
Lee will be joined by team-mate and former South Korean Under-23 selection Kim Seung-Young, who scored four goals last season for Gamba.
Neither player will go long without playing in Japan, as Ulsan Hyundai will play FC Tokyo away in mid-March in their AFC Champions League group match.
Goal_asia now has its own and account, so for all the latest news and features on Asian football follow us by clicking on the above links.