To elide malicious consequences of failures and drastic variations in microgrids, load shedding (LSH) protective schemes are presented to enhance voltage and frequency (v&f) stability margin or prevent v&f collapse. Nonetheless, conventional/off-line LSH algorithms which are devised based on one of v&f stability indicators, do not result in good performance. Under severe circumstances, restoring both v&f by removing optimal load values from appropriate buses is very vital. This paper proposes a four variable/dimensional voltage-frequency LSH strategy as a secondary control plan to expurgate the deviations of v&f in microgrids, independent of the primary control plan. In this, 4-D piecewise linear curves are proposed to determine the proper LSH location and amount of load rejection (ALR). Furthermore, LSH speed, duration of the v&f deviation, and the secure region border can be manipulated. Also, a solution is provided to prevent the over-voltage and overfrequency following LSH. This strategy is successfully applied on a 5-bus microgrid and the standard IEEE 37-bus system. The outcomes confirm the achievement of all aspects considered as the goal of the LSH strategy along with the decent dynamic responses of v&f. Eventually, a comparison proves that the AIR is optimized more than 20 percent using the proposed strategy.