The U.S. Marine Corps has indeed started a pilot program partnering with ICE to station immigration agents at three Marine Corps bases to prevent unlawful access by foreign nationals.
The U.S. Marines are starting a pilot program with ICE."

FactVerify
Source: factverify.com
What the Evidence Shows
Multiple reputable sources confirm that the U.S. Marine Corps has launched a pilot program in cooperation with Immigration and Customs Enforcement (ICE). This program involves posting ICE agents at the gates of three major Marine Corps installations: Camp Pendleton in California, Marine Corps Base Quantico in Virginia, and Marine Corps Base Hawaii. The stated goal of the program is to prevent foreign nationals from unlawfully accessing these military installations.
The program is described as a partnership aimed at enhancing base security and threat awareness, with ICE agents assisting base security personnel in screening visitors and referring unauthorized entries for appropriate action. The consistency across multiple news outlets, including Military. Com, Fox News, Marine Corps Times, and Task & Purpose, supports the accuracy of the claim that the Marines are starting this pilot program with ICE.