Ban recalled that under international law, the death penalty should be used for the most serious crimes and said "drug crimes are generally not considered to meet this threshold."
The appeal came as Indonesian authorities stepped up preparations for the execution by firing squad of 14 drug convicts including foreigners from Nigeria, Pakistan, India and Zimbabwe.
Indonesia has rejected international appeals to halt the executions.
The UN chief "urges President Joko Widodo to consider declaring a moratorium on the use of the death penalty in Indonesia and to move towards its abolition."
The United Nations opposes capital punishment.