Raleigh police tweeted footage of Ainsworth's finish.
"We are in awe of the progress Officer Ainsworth has fought so hard every day to obtain. We can't thank everyone enough for all of their support since January," the Raleigh Police Department said on Facebook.
Ainsworth was released from the hospital in April.
He was shot while investigating a stolen vehicle call on Jan. 9.
RELATED: Suspects arrested in connection with shooting of Raleigh Officer Charles Ainsworth