A novel active virtual impedance algorithm is here proposed to help sound-following robots avoid obstacles while tracking a sound source. The tracking velocity of a mobile robot to a sound source is determined by virtual repulsive and attraction forces to avoid obstacles and to follow the sound source, respectively. Active virtual impedance is defined as a function of distances and relative velocities to the sound source and obstacles from the mobile robot, which is used to generate the tracking velocity of the mobile robot. Conventional virtual impedance methods have fixed coefficients for relative distances and velocities. However, in this research, the coefficients are dynamically adjusted to extend the obstacle avoidance performance to multiple obstacle environments. The relative distances and velocities are obtained using a microphone array consisting of three microphones in a row. The geometrical relationships of the microphones are utilized to estimate the relative position and orientation of the sound source with respect to the mobile robot, which carries the microphone array. The effectiveness of the proposed algorithm is demonstrated by experiments.