Is morality uniquely human and how is it determined? We address these questions by studying choices behind the veil of ignorance (VOI) in one of our closest primate relatives, Formosan macaques (Macaca cyclopis). VOI is a concept which makes personal circumstances unknown at the time of decision. In essence, behind the VOI, no one knows whether he will be subsequently advantaged or disadvantaged when the veil is lifted. This ignorance makes personal considerations that benefit the self but are irrelevant to justice impossible. It is widely used to elicit impartial judgment in humans but is never tested, to the best of our knowledge, in other animals. We show that monkeys divide opportunity more equally behind the VOI than in a corresponding control when they are alone, suggesting the influence of other-regarding preferences. This tendency to be equal-minded behind the VOI correlates with the strength of disadvantageous inequity aversion when the decision maker (DM) falls behind, which in turn correlates with the body weight of the DM. Advantageous inequity aversion when the DM gets ahead, on the contrary, does not exhibit such correlations. Disadvantageous inequity aversion is prevalent across species. Our results suggest that this specific type of inequity aversion may underlie a more equal division of opportunity. Since there is always a chance of being disadvantaged behind the VOI, if disadvantageous inequity aversion is strong, a DM may divide the opportunity equally so that when subsequently disadvantaged, it does not fall behind much. This equal division may help continuing cooperation because everyone receives enough from the cooperating endeavor. In a natural setting such as prior to collaborative foraging, no one knows who will be eventually advantaged but division of opportunity still has to be coordinated in advance. This resembles what is captured by the concept of VOI. Disadvantageous inequity aversion, which arises ex post after the risk is resolved, may influence ex ante VOI decision. We speculate that this process may underlie precursory forms of morality.