Mentioned in Duncan’s (York Rite) Ritual and Monitor in connection to the third “craft” degree with the meaning “justice will sooner or later overtake us.
The Sword, Pointing To A Naked Heart,
Demonstrates that justice will sooner or later overtake us; and although our thoughts, words, and actions may be hidden from the eyes of man, yet that
Ahiman Rezon. Rituals of Freemasonry by Daniel Sickels (1870)
In the 5th degree of the Ancient and Accepted Scottish Rite there is also a similar image.
Millar seems to connect the symbol to the 3rd degree with as explanation: “courage”.
In the French book Mutus Liber Latomorum the heart is pierced and bleeding. The text below refers to an early “Eccosais” (Scottish) degree (the book is supposedly from 1765, more about it here).

Top: The Book Of The Ancient And Accepted Scottish Rite (1884) Charles McClenachan
Bottom: Mutus Liber Latomorum (1765)