This paper provides the first large-scale expert annotated corpus of Brazilian Instagram comments, a multilayer annotation schema for hate speech and offensive language detection on social media, and a contextual-aware offensive lexicon annotated with contextual information. The HateBR corpus was collected from the comment section of Brazilian politicians' accounts on Instagram and manually annotated by specialists. It is composed of 7,000 documents annotated according to three different layers: a binary classification (offensive versus non-offensive comments), offensiveness-level classification (highly, moderately, and slightly), and nine hate speech groups (xenophobia, racism, homophobia, sexism, religious intolerance, partyism, apology for the dictatorship, antisemitism, and fatphobia). The proposed specialized lexicon was manually identified by a linguist from the proposed corpus, which holds 1,000 explicit and implicit pejorative terms and expressions annotated with contextual information. Both the corpus and the contextual-aware offensive lexicon were annotated by three different experts and achieved high inter-annotator agreement. Lastly, we implemented baseline experiments on our corpus and lexicon. The obtained results outperform the current state-of-the-art for the Portuguese language, and the models which embody our specialized lexicon also present relevant performance in different languages. Accordingly, we hope that the proposed resources foster research on hate speech and offensive language detection in the Natural Language Processing area.