The label-free detection of one of the cardiac biomarkers, myoglobin, using a photonic-crystal-based biosensor in a total-internal-reflection configuration (PC-TIR) is presented in this paper. The PC-TIR sensor possesses a unique open optical microcavity that allows for several key advantages in biomolecular assays. In contrast to a conventional closed microcavity, the open configuration allows easy functionalization of the sensing surface for rapid biomolecular binding assays. Moreover, the properties of PC structures make it easy to be designed and engineered for operating at any optical wavelength. Through fine design of the photonic crystal structure, biochemical modification of the sensor surface, and integration with a microfluidic system, we have demonstrated that the detection sensitivity of the sensor for myoglobin has reached the clinically significant concentration range, enabling potential usage of this biosensor for diagnosis of acute myocardial infarction. The real-time response of the sensor to the myoglobin binding may potentially provide point-of-care monitoring of patients and treatment effects.