By using the non-Markovian master equation, we investigate the effect of the cavity and the environment on the quantum Fisher information (QFI) of an atom qubit system in a dissipation cavity. We obtain the formulae of QFI for two different initial states and analyze the effect of the atom-cavity coupling and the cavity-reservoir coupling on the QFI. The results show that the dynamic behavior of the QFI is obviously dependent on the initial atomic states, the atom-cavity coupling and the cavity-reservoir coupling. The stronger the atom-cavity coupling, the quicker the QFI oscillates and the slower the QFI reduces. Especially, the QFI will tend to a stable value not zero if the atom-cavity coupling is large enough. On the other hand, the smaller the cavity-reservoir coupling, the stronger the non-Markovian effect, the slower the QFI decay. In other words, choosing the best parameter can improve the accuracy of parameter estimation. In addition, the physical explanation of the dynamic behavior of the QFI is given by means of the QFI flow.