In this study, we propose a novel evolutionary computing method that is called quantum-inspired electromagnetismlike mechanism (QEM). QEM is based on the electromagnetism theory and uses the characteristic of quantum computation. We compare with quantum-inspired evolutionary algorithms (QIEA) and the other traditional heuristic algorithms to solve 0/1 knapsack problem. Meanwhile, we can also find the shortest tour length of 16 cities travelling salesman problem (TSP). The experimental results show that the QEM can rapidly and efficiently obtain the optimal solution of combinatorial optimisation problems. To conclude, QEM is an efficient solution for optimal control and adaptive control in stochastic/hybrid systems.