"Justin joins four other brothers laid to rest in the past seven weeks, one of the most painful periods in CHP history," said CHP Commissioner Joe Farrow.
McGrory is one of five CHP officers killed in the line of duty in less than two months.
The memorial service was followed by a procession to Sunset Hills Memorial Park, where McGrory was buried.
The 28-year-old CHP officer was killed on June 27 while conducting a traffic stop on Interstate 15 near Barstow. A car driven by an 18-year-old man veered onto the shoulder and hit McGrory.
The driver, Rafael Garcia of Las Vegas, has been charged with vehicular manslaughter and other felonies in connection to the death. Garcia pleaded not guilty, via video conference, from the San Bernardino County jail. If convicted, he could face eight years in prison.
"There are no words to capture the grief, the sorrow and the destruction that is caused by the negligent acts of an irresponsible driver," said Jeff Talbott of the CHP.
McGrory had been a member of the CHP for three years and was assigned to the Barstow area. He was also a member of the Air Force Reserve. He is survived by his wife Kelly, who is eight months pregnant, a 7-year-old daughter, and two sons, ages 4 and 1.
Friends said that when McGrory joined the CHP three years ago, he fulfilled a life-long dream, following in the footsteps of his father, a CHP lieutenant.
On Tuesday, McGrory received emotional tributes for his devotion to his family and his job by his commanding officers and his partner.
"My brother and my best friend," McGrory's partner Officer J.J. Jurado said as he wept. "I honor you, I miss you."
"If you know him or don't know him, there's so much honor that he deserves for going out there every day and doing what he loved," said McGrory's sister, Khirstin McGrory-Cooper.