A process for the preparation of N-substituted pyrrolidones by catalytic hydrogenation of maleic anhydride, maleic acid and/or fumaric acid in the presence of ammonia uses at least stoichiometric amounts of a primary alcohol or of an aldehyde and uses a catalyst which comprises cobalt and at least one of the elements manganese, copper, phosphorus, molybdenum and/or sodium.