Droop control is commonly used for primary control of island microgrids at the expense of voltage deviations. Furthermore, voltage and frequency restoration can be achieved using droop control along with the communication line. However, system complexity increases and reliability decreases due to the communication delay and data loss. Also, overmodulated voltage source converters (VSCs) degrade the ac output in a converter-dominated islanded microgrid. In this article, an improved technique is proposed to control voltage and frequency for an islanded microgrid. The band-pass filter-based droop control (an equivalent secondary control without a communication line) is developed to control distributed inverters to enhance voltage and frequency regulation by reducing response time, overshoot, and steady-state error. Furthermore, a modified proportional integral derivative (MPID) controller is adopted for inner voltage and current loop control to handle the system response fluctuation subject to perturbation and eliminate further voltage quality deterioration. For optimal control action of MPID controller, the controller parameters are tuned using dynamic weighted salp swarm algorithm and validated by both bode plot and step response. Furthermore, an optimal third harmonic injection-sine pulsewidth modulation technique is proposed to reduce the harmonic generation for the entire operation region of the VSC. The proposed control technique is simulated in MATLAB Simulink, and its performance is compared with a state-of-the-art method. Also, the proposed control technique is validated on the OPAL-RT real-time simulator test bench. Investigation revealed that the proposed technique improved the voltage and frequency regulation and effectively minimized overshoots and steady-state errors of the system.