We present an ab initio approach for evaluating a free energy profile along a reaction coordinate by combining logarithmic mean force dynamics (LogMFD) and first-principles molecular dynamics. The mean force, which is the derivative of the free energy with respect to the reaction coordinate, is estimated using density functional theory (DFT) in the present approach, which is expected to provide an accurate free energy profile along the reaction coordinate. We apply this new method, first-principles LogMFD (FP-LogMFD), to a glycine dipeptide molecule and reconstruct one- and two-dimensional free energy profiles in the framework of DFT. The resultant free energy profile is compared with that obtained by the thermodynamic integration method and by the previous LogMFD calculation using an empirical force-field, showing that FP-LogMFD is a promising method to calculate free energy without empirical force-fields.