We report the first heterogeneous catalytic hydrogenation of N-substituted imides and polyimide to generate primary amines, diols, and lactones. Catalyzed by Ag/TiO2, this reaction proceeded smoothly in high yields and selectivities for N-alkyl and N-aryl phthalimides and N-aryl succinimides, which also had activity for the degradation of waste polyimide plastics. In contrast to the typical Gabriel process, this reaction does not need any toxic reagent, and the byproducts are also very useful. Recycling experiments showed that the catalyst Ag/TiO2 could be easily recovered without a decrease in catalytic activity.