The solid–electrolyte interphase (SEI) is of crucial importance for the performance of Li-ion batteries. Here, density functional theory (DFT) calculations are used to study the formation of one of the simplest and early appearing components of the SEI layer, namely, LiF, which is produced by splitting HF impurities. The process is investigated on different models representing the basal and edge-planes of a graphitic anode, and on covalently connected carbon nanotubes and graphene sheets, known as pillared graphene. The results show that 2 Li atoms are required to bind F in the final state in order to make the reaction energetically favorable, or alternatively, a H atom must be preadsorbed. The Li adsorption energy, and thereby the Li coverage at a given potential, varies for the different carbon structures, demonstrating that the artificial nanostructure of the carbon can influence the formation of the SEI.