This paper presents a performance analysis of different microcantilever shapes integrated with the optical MEMS system in different fluid mediums. Microcantilevers such as rectangular, trapezoidal, and triangle profile are coupled with optical sensing layers. Here, the concept of integration of optical sensing layer with different shapes of microcantilever is novel. The cantilever is designed and developed in CAD tools. Numerical analysis of different shapes of microcantilever was carried out with the help of Ansys Workbench. Optimal design of the regular microcantilever is considered during the analysis. The pressure is applied to the free end of the cantilever in the range of 100 to 250 kPa. The complete photonic sensing layer is analyzed with the help of an finite difference time domain (FDTD) tool called MIT Electromagnetic Equation Propagation (MEEP). The transmission spectrum is obtained for each microcantilever model. The pressure‐induced refractive index is calculated for the equivalent maximum stress generated. The result shows that a remarkable Q factor was obtained for rectangular, trapezoidal, and triangular profile microcantilevers with an optical system. Triangular and rectangular profiles have shown remarkable contribution over quality factor for air mediums such as 10 120, 1300, respectively. High pressure sensitivity of 1.92 nm/kPa was obtained for rectangular microcantilever in air. Least sensitivity of 0.16 nm/kPa was obtained for triangle microcantilever in the water medium. The proposed work successfully distinguishes various shapes of microcantilever in terms of sensitivity and Q factor. It is having tremendous application in sensing biofluids and in device miniaturization.