After returning to Germany, she resumed training duties in the Baltic. She was withdrawn from service in May 1938 for a major modernization. The funnels were modified with raked caps and searchlight platforms on their sides. The ship's 8.8 cm guns were replaced with more powerful 10.5 cm guns. Work lasted until November 1939, shortly after the outbreak of World War II. She spent the next several months on trials and training maneuvers. On 4 January, "Karlsruhe" and the minelayer "Schiff 23" were sent to intercept the Swedish steamer "Konung Oscar", which was transporting Polish refugees from Riga to Sweden. "Karlsruhe" caught the Swedish vessel, declared it a prize, and sent it and the 41 Poles aboard to Memel. She was not ready for combat operations by the start of Operation Weserübung, so she was used as a troop transport for the attack on Kristiansand. The attack force also included an E-boat tender, four large torpedo boats, and several E-boats.