3-Acetyl-1,6,7,12b-tetrahydroindolo[2,3-a]quinolizin-2(12H)-one, C17H16N2O2, consists of two symmetry-independent molecules and each forms a layered structure stabilized by N-H...O and C-H...O hydrogen bonds. In 3-acetyl-6,7-dihydroindolo[2,3-a]quinolizin-4(12H)-one monohydrate, C17H14)N2O2.H2O, the structure is stabilized by O-H...O, N-H...O and C-H...O hydrogen bonds, with the ordered water molecule playing a crucial role in the self-assembly. Contribution from the weak interactions to the strong hydrogen-bonded network is a common feature in both structures.