The term is used flexibly, and can be used to describe a fictionalized version of rural historical China (usually using loose influences from across the ~1000 BC–280 AD period); a setting of feuding martial arts clans and the people of that community; a secret and possibly criminal underworld; a general sense of the "mythic world" where fantastical stories happen; or some combination thereof.
A closely related term, wulin (武林; wǔlín; 'martial forest'), refers exclusively to the community of martial artists that inhabit a jianghu setting.
In modern Chinese culture, jianghu is commonly accepted as an alternative universe coexisting with the actual historical one in which the context of the wuxia genre was set.
Unlike the normal world, in the jianghu, the youxia (wanderers or knights-errant) are free to act on their own initiative, including with violence, to punish evil and foes, and to reward goodness and allies.
These outlaws were called the Chivalrous men of the Green Forests (绿林好汉; 綠林好漢; lǜlín hǎohàn) and they then proceed to have various adventures, mixing heroism with more roguish activities.
Over the centuries, jianghu gained greater acceptance among the common people and gradually became a term for a sub-society parallel to, and sometimes orthogonal to, mainstream society.
This sub-society initially included merchants, craftsmen, beggars and vagabonds, but over time it assimilated bandits, outlaws and gangs who lived "outside the existing law".
During the Song and Yuan dynasties, bards and novelists began using the term jianghu in the process of creating literature covering a fictional society of adventurers and rebels who lived not by existing societal laws, but by their own moral principles or extralegal code of conduct.
The core of these moral principles encompassed xia (俠; 侠; xiá; 'chivalry'), yi (義; 义; yì; 'righteousness'), li (禮; 礼; lǐ; 'virtue'), zhong (忠; zhōng; 'loyalty') and chou (仇; chóu; 'vengeance/revenge').
Local officials who are savvier would know better than to expect co-operation from jianghu members and would refrain from seeking help except to apprehend the worst and most notorious criminals.
An interesting aspect is that while senior officials are kept at a distance, jianghu members may freely associate with low-ranking staff such as runners, jailers, or clerks of the magistrates.
The jianghu members maintained order among their own in the community and prevented any major disturbance, thus saving a lot of work for their associates in the yamen.