We investigate the sparse activity detection problem in cell-free massive multiple-input multiple-output (MIMO) systems in this paper. With the approximate message passing (AMP) algorithm, the received pilot signals at the access points (APs) are decomposed into independent circularly symmetric complex Gaussian noise corrupted components. By using the minimum mean-squared error (MMSE) denoiser during the AMP procedure, we obtain a threshold detection rule, and analytically describe the noise covariance matrix of the corrupted components via the state evolution equations, which is helpful for the performance analysis of the detection rule. Using the law of large numbers, it can be shown that the error probability of this threshold detection rule tends to zero when the number of APs, pilots and users tend to infinity while the ratio of the number of pilots and users is kept constant. Numerical results show that the error probability decreases while the number of APs increases, corroborating our theoretical analysis. In addition, we investigate the relationship between the error probability of the threshold detection rule and the number of symbols used for pilot transmissions during each channel coherence interval via numerical results.