The biodegradation of biorecalcitrant opioid drug tramadol (TRAM) was studied in a model biodegradation experiment performed with an enriched activated sludge culture pre-adapted to high concentration of TRAM (20 mg/L). TRAM and its transformation products (TPs) were determined by applying ultrahigh-performance liquid chromatography/quadrupole-time-of-flight mass spectrometry (UHPLC-QTOF-MS), the sludge culture was characterized using a 16S rRNA gene amplicon sequencing, whereas ecotoxicological evaluation was performed based on determination of toxicity to freshwater algae. Tramadol removal was much faster (t1/2 = 1.3 days) and more efficient in glucose-containing mineral medium (cometabolic conditions) than in a medium without glucose. The elimination of the parent compound resulted in the formation of five TPs, two of which (TP 249 and TP 235) were identified as N-desmethyltramadol (N-DM TRAM) and N,N-didesmethyltramadol (N,N-diDM TRAM). The remaining 3 TPs (TP 277a-c) were isomeric compounds with an elemental composition of protonated molecules C16H24NO3 and a putative structure which involved oxidative modification of the dimethylamino group. Pronounced changes in the taxonomic composition of the activated sludge were observed during the enrichment, especially regarding an enhanced percentage of 8 genera (Bacillus, Mycobacterium, Enterobacter, Methylobacillus, Pedobacter, Xanthobacter, Leadbetterella and Kaistia), which might be related to the observed transformations. The removal of TRAM resulted in proportional reduction of algal toxicity, implying a positive result of the accomplished transformation processes.