According to various embodiments, an electronic device comprises: a housing; a first wireless communication circuit located inside the housing and configured to support directional wireless communication by using beamforming; a second wireless communication circuit located inside the housing and configured to support omni-directional wireless communication; a processor operatively connected to the first wireless communication circuit and the second wireless communication circuit; and a memory operatively connected to the processor. The memory, when running, may store instructions for the processor to: perform the directional wireless communication together with an external electronic device capable of performing the directional wireless communication and the omni-directional wireless communication, by using the first wireless communication circuit; determine the distance between an electronic device and the external electronic device, at least partially on the basis of a signal of the external electronic device received by using the second wireless communication circuit, when the stop or degradation of the directional wireless communication is detected; and reattempt the directional wireless communication by using the first wireless communication circuit, at least partially on the basis of the determined distance, or determine whether to start the omni-directional wireless communication by using the second wireless communication circuit. Other embodiments are possible.