It was not immediately clear whether those released include the thousands of political detainees imprisoned for opposing military rule. AP news reported.
The amnesty comes as the military government proceeds with a monthlong, three-stage election process that critics say is designed to add a facade of legitimacy to the status quo.
State-run MRTV television reported that Senior Gen. Min Aung Hlaing, the head of the military government, pardoned 6,134 prisoners.
A separate statement said 52 foreigners will also be released and deported from Myanmar. No comprehensive list of those freed is available.
Other prisoners received reduced sentences, except for those convicted of serious charges such as murder and rape or those jailed on charges under various other security acts.
The release terms warn that if the freed detainees violate the law again, they will have to serve the remainder of their original sentences in addition to any new sentence.