With the integration of electromagnetic devices, the modules that make up into the devices and the functions that the devices needed to achieve are becoming more and more diverse. The coupling between the modules is difficult to ignore, the difficulty in designing increases sharply, and the traditional design methods gradually become incompetent. It is urgent to find a new comprehensive electromagnetic design method. This paper is to use the spatiotemporally synchronous focusing characteristics of time-reversed electromagnetic waves to explore the possibility of applying time-reversal technique to device design. First, based on the general device inverse design process, using the time-reversal technique, dyadic Green's function and basic principle of electromagnetics, a method of converting the port field distribution into the internal field distribution of the device is proposed. It is also proved that the continuous equivalent source obtained by the time-reversed field at a certain position in space can produce a field distribution close to the desired field at the port. In the single frequency inverse design process, only the tangential component of the electric field or magnetic field of the port is needed to be known. Then, with the help of the reciprocity of Green's function, the above theory is transformed to facilitate the numerical simulation. This numerical simulation realizes the reconstruction of the amplitude distribution source and the phase distribution source. It should be noted that the amplitude distribution source and phase distribution source are both randomly constructed. The numerical simulation verification is completed in two different cases and a variety of different initial conditions. All the simulation results are consistent with the theoretical results, which proves that it is feasible to apply time-reversal technique to the inverse design of electromagnetic devices.