In a machine for filling capsules (2), each of which defined by a bottom (3) and a cap (4), with pharmaceutical products, the bottoms (3) and the caps (4) of the capsules (2) are moved forward in sequence about a plurality of wheels (10) provided with at least two actuating members (25, 63a, 63b) movable under the control of respective tappets (32, 69, 77) engaged in respective cams (28, 66, 74) to open and close the capsules (2) themselves, respectively the cams (28, 66, 74) being obtained on the outer surface (29) of a drum (16) mounted to rotate about a rotation axis (17) parallel to the rotation axes (12) of the wheels (10).