The optimisation of electromagnetic inverse problems could be attributed to a constraint nonlinear programming problem. Loney's solenoid problem is one of the electromagnetic inverse benchmarks in the magnetic field. Parameters such as the structure and medium are necessary to be designed based on the required magnetic properties. In this paper, an improved variant of pigeon-inspired optimisation (PIO) algorithm based on Cauchy distribution and Gaussian distribution, named Cauchy-Gaussian pigeon-inspired optimisation (CGPIO), is proposed to solve electromagnetic inverse problems. The PIO algorithm is a bio-inspired swarm intelligence optimisation algorithm, which imitates the homing process of pigeons. To improve the convergence efficiency of the basic PIO algorithm, two operators including Cauchy distribution and Gaussian distribution are utilised. Comparative results show the suitability and superiority of CGPIO algorithm for electromagnetic optimisation.