How to overcome the friction between the micro components has become a key point of the successful operation of the micro/nano-electric mechanical systems. The understanding of the friction mechanism of the alkane liquid film confined between two substrates is important when the friction law on a macro/nano scale is not applicable. In this work, the molecular dynamics simulations are used to study the effect of the chain length on the friction properties of the liquid films that are confined between two golden substrates. There are seven pure alkane liquid films that are composed of one molecule C<sub><i>n</i></sub>H<sub>2<i>n</i> + 2</sub>(<i>n</i> = 6, 8, 10, 12, 14, 16, 18), and six mixed alkane liquid films that are composed of two molecules C<sub>6</sub>H<sub>14</sub>/C<sub><i>n</i></sub>H<sub>2<i>n</i> + 2</sub>(<i>n</i> = 8, 10, 12, 14, 16, 18) with a ratio of 1∶1. The results show that the friction force and the coefficient of friction of pure alkane liquid films both increase as the chain length increases when the carbon atom number is less than 12, whereas the friction property keeps stable when the carbon atom number of the alkane molecule is greater than 10 and the pure hexadecane liquid film has the largest friction force. In the mixed films, the addition of short chain alkane molecules can strengthen the friction, and the hexane/dodecane mixed film has the maximum friction force. The short chain molecule dilutes the C<sub>8</sub>H<sub>18</sub> film and C<sub>10</sub>H<sub>22</sub> film which cause the friction force to decrease. During the sliding progress, the formation of solid-like high density-packet layers is the main reason for the friction reduction. When no solid-like layer or just one solid-like layer is formed at the interface of golden base, the liquid alkane film is liquid-like and its viscosity becomes much larger than that in the normal state, which leads to high friction force. The short chain molecules reduce the density of the solid-like layers, which causes the film to transform from solid-like state to liquid state, thus resulting in the increase of friction. The friction property mainly depends on the layered structure, and the interaction between the golden surface and liquid film contributes to the friction. This study helps to understand the friction mechanism of ultra-thin liquid films.