A fast, mechanochemical and solvent-free synthesis of substituted tetrahydropyrimidines and octahydroquinazolines under Au(III)-catalysis has been developed. The practical feasibility, eco-friendliness and operational simplicity of this chemistry is exemplified by ball milling three components such as formaldehyde, amines and 2-butynedioates/dimedone in a shaker mill for as little as five minutes, thus avoiding the requirement of undesirable solvents and long reaction times. Moreover, this protocol furnishes the target compounds in high yields without any side products and in some cases offers products with excellent regioselectivity. Out of the 26 compounds screened for anticonvulsant potency, 11 compounds exhibited comparable activity against a standard drug.