In a machine for filling capsules, each of which defined by a bottom and a cap, with pharmaceutical products, the bottoms and the caps of the capsules are moved forward in sequence about a plurality of wheels provided with at least two actuating members movable under the control of respective tappets engaged in respective cams to open and close the capsules themselves, respectively the cams being obtained on the outer surface of a drum mounted to rotate about a rotation axis parallel to the rotation axes of the wheels.