The expression "cap" started in the early 1900, no cap first appeared on twitter around 2012.
In Black slang,
to cap about something is "to brag," "to exaggerate," or "to lie" about it. This meaning of
cap dates back to the early 1900s.
History lesson: In the 1940s, according to
Green's Dictionary of Slang,
to cap is evidenced as slang meaning "to surpass," connected to the ritualized insults of
capping (1960s). These terms appear to be rooted in the sense of
cap as "top" or "upper limit."
So,
no cap has the sense of "no lie," "no joke," "for real," or "not bragging." The expression is closely associated with slang in Atlanta-area hip-hop. It appears on Twitter by at least 2012, though it was almost certainly in use in spoken English before then.