We present molecular dynamics friction calculations for confined hydrocarbon “polymer” solids with molecular lengths from 20 to 1400 carbon atoms. Two cases are considered: (a) polymer sliding against a hard substrate and (b) polymer sliding on polymer. We discuss the velocity dependence of the frictional shear stress for both cases. In our simulations, the polymer films are very thin (∼3 nm), and the solid walls are connected to a thermostat at a short distance from the polymer slab. Under these circumstances we find that frictional heating effects are not important, and the effective temperature in the polymer film is always close to the thermostat temperature. In the first setup (a), for hydrocarbons with molecular lengths from 60 to 1400 carbon atoms, the shear stresses are nearly independent of molecular length, but for the shortest hydrocarbon C20H42 the frictional shear stress is lower. In all cases the frictional shear stress increases monotonically with the sliding velocity. For polymer sliding on polymer (case b) the friction is much larger, and the velocity dependence is more complex. For hydrocarbons with molecular lengths from 60 to 140 C atoms, the number of monolayers of lubricant increases (abruptly) with increasing sliding velocity (from 6 to 7 layers), leading to a decrease of the friction. Before and after the layering transition, the frictional shear stresses are nearly proportional to the logarithm of sliding velocity. For the longest hydrocarbon (1400 C atoms) the friction shows no dependence on the sliding velocity, and for the shortest hydrocarbon (20 C atoms) the frictional shear stress increases nearly linearly with the sliding velocity.