The retired footballer will join Del Boy and Rodney, played by Sir David Jason and Nicholas Lyndhurst, when the sketch is screened on BBC1's Sport Relief night in March.
The sketch comes as no big surprise as Beckham has taken part in previous broadcasts for Sport Relief. One of the most memorable appearances was with comdian and actor James Cordon.
Christmas 2003 was the last time Jason and Lyndhurst revived their roles as the wheeler-dealer Trotter brothers from Peckham.
For this years sketch, the trio are pictured sitting around a table in a greasy-spoon cafe with a copy of the Peckham Echo.
It was only last Thursday that Only Fools and Horses actor, Roger Lloyd Pack, who played dopey road-sweeper Trigger died after a battle with cancer.