After Indonesia's independence in 1945, Moeljatno began working as high prosecutor. In 1946 he joined Minister of Justice Soepomo and several other Ministry of Justice employees in formulating Law Number 1 of 1946, which applied the criminal code throughout the United States of Indonesia. In 1947, he was promoted to Deputy Chief Prosecutor under Tirtawinata. He was stationed in Yogyakarta, where he was invited to teach at the newly established faculty of law at Gadjah Mada University. When he quit his job as prosecutor in 1952, he dedicated himself exclusively to teaching.