Ontology is broadly applied in various fields for creating trust‐based data access control models. In the case of the medical field, utilizing ontology is highly recommended for securing the medical report and patient information. Here, ontology is integrated with the grid computing system for achieving better authentication and security in the healthcare system. Various ontology based data access control models are designed by different authors for achieving enhanced user authorization and security. Security is still found to be a major issue in the existing techniques. To overcome this issue, the proposed work developed a medical ontology with three tier secure access control. The proposed method is processed in three layers. In the first layer, job scheduling for user is achieved. Job scheduling is carried out by scheduler using a deadline priority based scheduling algorithm. Users are scheduled with a different job based on their priority level such as low, medium, and high. In the second layer, role based policy is developed for finding and eliminating the accessing of unauthorized users. The third layer is used for securing medical database. Medical database is secured from various through encrypting the data using XOR cryptography algorithm. The proposed architecture is validated using some of the metrics such as turnaround time, tardiness, actual time delay, and throughput. The turnaround time, tardiness, and actual‐time delay attains for the proposed architecture are 64.60, 4.90, and 1.52 seconds, respectively. Then, the throughput value reaches for 25 bits length of encryption is 0.88 Mbps. The simulation analysis reveals that the proposed architecture reduces the waiting time of users and improves medical data security.