At first serving in the military police, he soon became a reputed detective whose job was to uncover moles in the Japanese intelligence service and to hunt communists.
After gaining the latter's trust by having himself intentionally arrested several times in the process, he was able to gather intelligence allowing the Japanese military to neutralize a spy network of about 60 agents from the Soviet Union.
Around the end of 1945, he visited a friend and former assistant Kim Yun-won (金允元) in Chorwon, who betrayed him; he was sentenced to death for "anti-Korean deeds" and for arresting anti-Japanese combatants.
Rhee, aware that complete control over the army was the only possible way to maintain his regime, saw Kim Chang-Ryong as the ideal right-hand man, as an efficient young officer who could "clean up the mess in the army" and get rid of anyone capable of threatening Rhee's position (Kim himself posed no threat, as his record of having served the Japanese ensured that he would never be supported by the people).
Armed with the favored connection to the country's leader, Kim perhaps became somewhat reckless in his investigations and obviously made serious enemies among army officers, many of whom were indeed involved in corruption business or subversive activities.
Kim, now a superior officer, formed, with the support of US Army officials, the CIC, or Counter-intelligence Corps, which was responsible for arresting and interrogating thousands of suspected North Korean spies.
Also, Kim had never been part of the very tight community of frontline officers that had formed during the Korean War, which worsened the estrangement from most of his colleagues.