In 1878, Roesler was invited by the government of Japan to serve as an advisor on international law to the Foreign Ministry.
As the request of Itō Hirobumi Roesler assisted Inoue Kowashi and took an influential role in the preparation of the draft of the Japanese Commercial Code and the Constitution of the Empire of Japan.
From the time of the Iwakura mission, the Japanese ruling oligarchy had evaluated the various forms of government extant in Europe and America and were most impressed by the Austro-Germano-Prussian model, based on theories by Lorenz von Stein and Rudolf von Gneist and the organization of Prussian government designed by Albert Mosse.
Roesler expanded on these theories, by recommending a constitutional monarchy in which the monarch was head of state, but not constrained by the legislature, whose primary responsibility was to provide advice and consent to the Emperor's rule, and not to govern the country or to promulgate laws.
After leaving Japan, Roesler and his family moved to Bolzano, then part of Austria-Hungary where he died shortly after.