dark past; cringeworthy history; something one wants to forget
Internet slang for embarrassing or shameful past events, often from one's youth, that one wishes to erase or pretend never happened. Commonly used self-deprecatingly.
The poems I wrote in middle school are totally a dark past I want to forget.
昔のブログを見つけて黒歴史を掘り返してしまった。
I found my old blog and ended up digging up my cringeworthy history.
歴史 is the standard word for 'history'. 黒歴史 is a slang compound meaning 'dark history'.
The term originated in the anime series 『∀ガンダム』, where 黒歴史 denoted a concealed history of past wars. It later spread as slang for an embarrassing past one would prefer to forget.