This paper proposes a dual-polarized and high gain, four-element based compact multiple-input-multiple-output (MIMO) antenna operating at 5.2 GHz. First, a hammer-shaped antenna has been designed with a gain of 5.3 dBi, impedance bandwidth of 400 MHz, and broadside radiation. A mathematical analysis for radiated electric field and an equivalent circuit model of the hammer-shaped antenna are developed. Using the hammer-shaped antenna as an element, four element MIMO design with shorting walls is proposed. The shorting walls near non-radiating edges improve isolation between the elements by changing the direction of the major lobe. The proposed MIMO design has an envelope correlation coefficient (ECC) < 0.15, measured gain of 5.5 dBi, and mean effective gain (MEG) ∼−3dB. This design has a low profile and single layer planar structure of area 65 mm × 65 mm, which makes it a good contender for portable devices or low-profile hand-held applications in WLAN band. © 2021, Electromagnetics Academy. All rights reserved.