"We both had to really learn how to respect each other, and we earned it," he added.
The film, directed by Scott Kalvert, featured DiCaprio, 43, as basketball player Jim who develops an addiction to heroin.
It was the second feature for Walhberg, who had played the role of Mickey, after he had switched from music to acting.
After the film, Walhberg went on to star in features such as "Boogie Nights", "Planet Of The Apes" and "The Departed", where he once again acted alongside DiCaprio.
Watch a scene from 'Basketball diaries' starring Leonardo Dicaprio and Mark Wahlberg below!