Panjsheri studied at
Kabul Teachers College and was the faculty of letters at the
Kabul University. After working in a
journal under the name,
Anis and teaching literature at the Kabul Teachers College he started working for the Ministry of Information and Culture. In 1965, he became a member of the Central Committee of the PDPA at their first congress meeting on January 1, 1965. When
Babrak Karmal left the PDPA because of the power struggle between the
Khalq and the
Parchams, Panjsheri left the party with Karmal and the rest of his supporters, he eventually returned to his original position in the PDPA and became a member of the Khalqi faction again. Later on, he tried to establish his own splinter
communist party, which turned out to be unsuccessful. Between 1969 and 1972 he was imprisoned for political activities. It is unknown what position he held or what he did under the rule of
Mohammad Daoud Khan's
Daoud's Republic of Afghanistan (1973–1978). == Democratic Republic of Afghanistan ==