Mathematical optimization is a branch of applied mathematics which is useful in many different fields. Metaheuristics make it possible to solve intractable optimization problems. Electromagnetism-like algorithm and harmony search are metaheuristic optimization algorithms. A model has been developed, and direct and inverse problems of chemical kinetics have been solved for such an industrially important catalytic process as the pre-reforming of hydrocarbons into a synthesis gas with a high methane content. To determine the reaction rate constants and activation energies, relatively young metaheuristic optimization algorithms were used: the electromagnetic algorithm and the harmony search algorithm. These heuristic algorithms for solving this problem of chemical kinetics were developed and compared with each other. The conclusion is made about which algorithm is most suitable for the problem under consideration. Previously, these algorithms were tested on benchmark functions, the optimum of which is known in advance. The obtained coefficients were verified when running the direct problem and the results were compared with experimental data.