In a machine for filling capsules (2) with pharmaceutical products, the bottom (3) of each capsule (2) is moved forward along a path (P) determined in phase with a dosing device (36), which transfers the pharmaceutical product from a tank (60) to the bottom (3), and has a cylinder (47), a piston (87) engaged in the cylinder (47), a spring (89) interposed between the cylinder (47) and the piston (87) for normally maintaining the piston (87) in contact with a stopping element (86), and a tappet (44) carried by the cylinder (47), engaged in a cam (41), and adapted to move the cylinder (47) and the piston (87) with respective mutually identical laws of motion.