It is extremely likely that the black skin, flesh and internal organs of the Ayam Cemani originates from Ayam Bekisar ancestry. One of the common morphs of these crosses are chickens with black skin, flesh and organs. The ayam Bekisar is a very ancient cross and it's precise history is unclear. Most Indonesians believe it to have first discovered by people living in Kangean Islands (a group of tiny islands just East of the main Java island). Ayam Bekisar still remains popular in that area and is the mascot for the province of East Java.
Back crosses of the Ayam Bekisar back to the green jungle-fowl have been proved by several studies to be unlikely due to chromosomal mismatch of the hybrids. The hybrids are often sterile with only some males being capable of breeding with domestic hens and producing offspring. So they would have been further crossed with red jungle-fowl (i.e. away from the green jungle-fowl).
Solid black birds with other dark feature were progressively selected over time to create a completely black bird with a ghostly appearance that we know as the ayam Cemani. When and where exactly this was done and by whom is unclear, but in the 1920's Mr. Tjokromihardjo from Grabag, Magelang was documented as the major founder of the current breed and his sons and their descendants carry on the tradition today of keeping the breed alive.
The breed was imported into the Netherlands around 2000 and has been gradually spread across Europe.