This study aims to analyze the effect of job insecurity, competence, and compensation on work integrity and employee loyalty at the Rokan Hulu Regency Environmental Service. The population of this study was all employees at the Rokan Hulu Regency Environmental Service totaling 62 people. In this study, a census technique was used in which the entire population was sampled in this study except for the author and the leader. For this reason, the data taken as a research sample were 60 respondents. Data analysis used Structural Equation Modeling (SEM) using the SmartPLS 4.0.0 application. The results of this study indicate that job insecurity does not have a significant effect on work integrity. Competence has a positive and significant effect on work integrity. Compensation does not have a significant effect on work integrity. Job insecurity, competence and compensation do not have a significant effect on employee loyalty. Integrity has a positive and significant influence on the loyalty of employees of the Rokan Hulu Regency Environmental Service. Penelitian ini bertujuan untuk menganalisis pengaruh job insecurity, kompetensi, dan kompensasi terhadap integritas kerja dan loyalitas pegawai di Dinas Lingkungan Hidup Kabupaten Rokan Hulu. Populasi penelitian ini adalah seluruh pegawai pada Dinas Lingkungan Hidup Kabupaten Rokan Hulu yang berjumlah 62 orang. Dalam penelitian ini digunakan teknik sensus di mana seluruh populasi dijadikan sampel dalam penelitian ini kecuali penulis dan pimpinan. Untuk itu data yang diambil sebagai sampel penelitian adalah 60 responden. Analisis data menggunakan Structural Equation Modelling (SEM) menggunakan aplikasi SmartPLS 4.0.0. Hasil penelitian ini menunjukkan bahwa job insecurity tidak berpengaruh signifikan terhadap integritas kerja. Kompetensi berpengaruh positif dan signifikan terhadap integritas kerja. Kompensasi tidak berpengaruh signifikan terhadap integritas kerja. Job insecurity, kompetensi dan kompensasi tidak berpengaruh signifikan terhadap loyalitas pegawai. Integritas berpengaruh positif dan signifikan terhadap loyalitas pegawai Dinas Lingkungan Hidup Kabupaten Rokan Hulu.