The former discus athlete gave up athletics earlier this year and decided to pursue a career in the NFL.
After performing well in pro days in front of several scouts from teams across the NFL, the 21-year-old expressed his hope of being drafted.
However, no team picked him during the seven round draft held this week. The 49ers moved swiftly after the draft to acquire as an undrafted free agent to join their talented roster.
Okoye said on Twitter: "Proud to announce that I will be signing with the San Francisco @49ers!!!!!!!!!!!!!!"
Last season the 49ers made it all the way to the Super Bowl before losing to the Baltimore Ravens.