In this paper, we analyse the patterns and trends of horizontal inequality and ethnic diversity in Brazil in the past 30 years and their effect on the quality of the country's institutions. Using data from the last four demographic censuses (1980, 1991, 2000, and 2010), we estimate numerous measures to analyse inequalities between different 'ethnic' groups. Our results show that, in Brazil between 1980 and 2010, the trend toward greater equality shown in other analyses of vertical inequality, is also found in terms of horizontal inequalities along racial, gender, and regional lines. Nevertheless, horizontal inequalities in terms of race and gender, in particular, remain pronounced. Ethnic diversity regarding race and religion has increased since 1980. Through our regression analysis, we note that both horizontal inequality and ethnic diversity negatively affect the institutional quality of Brazilian municipalities.