Porous silicon has many advantages, such as biodegradability, biocompatibility, tunable pore size and active covalent and non-covalent surface chemical properties. One-dimensional porous silicon photonic crystal microcavity structure has the characteristics of porous silicon and optical microcavity, it is compatible with existing silicon micromachining technology and can be embedded into the sensitive chip so as to realize the function of micro-nano detection devices and integration. At present, there are many biosensors based on existing porous silicon microcavity, through controlling the pore size of porous silicon microcavities, the biological target molecules penetrate into the porous silicon microcavity structure, leading to increases of refractive index of porous silicon layers. In the practical test, we found that the penetration of biological molecules in the microcavity is not uniform, it is difficult to enter into the deeper porous silicon layers, according to this, the paper will explore the distributional characteristics of different biological molecules in the microcavity, and the variation of the sensing efficiency under the circumstance of nonuniform increase in refractive index. This study will be helpful to the accurate design and theoretical development of high efficiency porous silicon microcavity biosensor.