Amorphous carbon films have been explored and used in a wide variety of applications. With the n-type and p-type amorphous carbon film, it can be used to make p-n junctions for solar cells. This research aims to study the structure of boron- and nitrogen-doped amorphous carbon (a-C:B and a-C:N) films. This research uses the basic material of bio-product from palmyra sugar to form amorphous carbon. Amorphous carbon was synthesized by heating the palmyra sugar at 250°C. The results of XRD showed that the doped films produce an amorphous carbon phase. PES was used to analyze the bonding state of dopants in the sample. B4C, BC3, and BC2O bonds formed in a-C:B, while pyridine and pyrrolic formed in a-C:N.