Baryon number violation is a key ingredient of baryogenesis. It has been hypothesized that there could also be a parity-conjugated copy of the standard model particles, called mirror particles. The existence of such a mirror universe has specific testable implications, especially in the domain of neutral particle oscillation, viz. the baryon number violating neutron to mirror-neutron (n−n′) oscillation. Consequently, there were many experiments that have searched for n−n′ oscillation, and imposed constraints upon the parameters that describe it. Recently, further analysis on some of these results have identified anomalies which could point to the detection of n−n′ oscillation. All the previous efforts searched for n−n′ oscillation by comparing the relative number of ultracold neutrons that survive after a period of storage for one or both of the two cases: (i) comparison of zero applied magnetic field to a non-zero applied magnetic field, and (ii) comparison where the orientation of the applied magnetic field was reversed. However, n−n′ oscillations also lead to variations in the precession frequency of polarized neutrons upon flipping the direction of the applied magnetic field. Precession frequencies are measured, very precisely, by experiments searching for the electric dipole moment. For the first time, we used the data from the latest search for the neutron electric dipole moment to constrain n−n′ oscillation. After compensating for the systematic effects that affect the ratio of precession frequencies of ultracold neutrons and cohabiting 199Hg-atoms, chief among which was due to their motion in non-uniform magnetic field, we constrained any further perturbations due to n−n′ oscillation. We thereby provide a lower limit on the n−n′ oscillation time constant of τnn′/|cos(β)|>5.7s,0.36T′<B′<1.01T′ (95% C.L.), where β is the angle between the applied magnetic field and the ambient mirror magnetic field. This constraint is the best available in the range of 0.36T′<B′<0.40T′.