Wiktionary gives the meaning of "break bad" but does not mention about the origin:
1. (colloquial, of an event or of one's fortunes) To go wrong; to go downhill.
2. (colloquial, chiefly Southern US and Midwest US, of a person) To go bad; to turn toward immorality or crime.
Cassell's Dictionary of Slang (by Jonathon Green) has the below definition that gives a hint about the origin:
break bad v. 1 [1960s] (US Black) to become angry and aggressive 2 [1980s] (US campus) to perform well. [BREAK v.2 (3) + SE bad]
break v.2 (US) 3 [1930s] to conduct oneself.
It looks like the origin is African American Vernacular English but how did this phrase emerge exactly? And how did it gain a new meaning (with almost opposite connotations) in campus slang?