The results of research conducted on a supercharged spark ignition gaseous engine are exposed in the paper. The engine was modified to work as an engine with the Miller cycle. Modification of the engine, that allowed it to work in the Miller cycle, dealt particularly with the camshaft. This modification allows changing both intake and exhaust timings independently with limitations of ±20 deg. During the research, the engine was fuelled with compressed natural gas or hydrogen optionally. It was for making comparison between selected engine parameters, while the engine was working on two significantly different fuels. Both fuels were delivered to intake manifold close to intake valve through a fuel mixer. During the research, pressure data was collected with various both spark ignition timings and equivalence ratios, and boost pressures. On the basis of obtained data the parameters as follows: indicated mean effective pressure, coefficient of variance from the indicated mean effective pressure, Normalized Mass Fraction Burn and Heat Release Rate were calculated and discussed. As observed optimal ignition, timing is advanced for the engine working on hydrogen or natural gas as fuel with the Miller cycle when compared to the classic Otto cycle applied to this engine. In all tests of the engine with the Miller cycle coefficient of variance from the indicated mean effective pressure indicates good stability of engine work. Finally, the engine working on hydrogen is characterized by shorter combustion period that resulted from higher laminar flame speed compared to the natural gas fuelled engine.