We report the results of a deep photometric search for planets and brown dwarfs in the nearby young OB Upper Scorpius association . We obtained optical ( I ) and near-infrared ( JK _ { s } ) images around nine very low-mass stars and brown dwarf member candidates of the association , covering a total area of 113 arcmin ^ { 2 } . Using a point spread function subtraction technique , we have searched for planetary-mass companions ( 0.002 M _ { \odot } < M < 0.013 M _ { \odot } ) at separations as close as 3″ from the targets . We have not found any brown dwarfs more massive than 0.030 M _ { \odot } at projected distances larger than 70 AU , or planets more massive than 0.007 M _ { \odot } at projected distances larger than 600 AU . We set an upper limit of 20 % ( confidence level 68.3 % ) to the fraction of very low-mass stars and massive brown dwarfs with planetary mass companions ( M > 0.007 M _ { \odot } ) at physical distances larger than 600 AU . From the I , I - J colour-magnitude diagrams and follow-up K _ { s } -band photometry , we identify four very red objects ( I - J > 2.5 ) in the area of the survey . According to their positions in the diagram , below the expected theoretical sequence of the cluster , three are probable late M-dwarfs in the field . The faintest and reddest object ( J - K _ { s } = 2.39 \pm 0.06 ) may be either a field intermediate L-dwarf with anomalously red J - K _ { s } colour at a distance of \sim 135 pc , an extremely red distant galaxy , or a reddened planetary-mass object in the Upper Scorpius association .