This study evaluated the effects of a trehalolipid biosurfactant produced by Rhodococcus ruber IEGM 231 on the bacterial adhesion and biofilm formation on the surface of polystyrene microplates. The adhesion of Gram-positive (Arthrobacter simplex, Bacillus subtilis, Brevibacterium linens, Corynebacterium glutamicum, Micrococcus luteus) and Gram-negative (Escherichia coli, Pseudomonas fluorescencens) bacteria correlated differently with the cell hydrophobicity and surface charge. In particular, exponentially growing bacterial cells with increased hydrophobicities adhered stronger to polystyrene compared to more hydrophilic stationary phase cells. Also, a moderate correlation (0.56) was found between zeta potential and adhesion values of actively growing bacteria, suggesting that less negatively charged cells adhered stronger to polystyrene. Efficient biosurfactant concentrations (10–100 mg/L) were determined, which selectively inhibited (up to 76 %) the adhesion of tested bacterial cultures, however without inhibiting their growth. The biosurfactant was more active against growing bacteria rather than resting cells, thus showing high biofilm-preventing properties. Contact angle measurements revealed more hydrophilic surface of the biosurfactant-covered polystyrene compared to bare polystyrene, which allowed less adhesion of hydrophobic bacteria. Furthermore, surface free-energy calculations showed a decrease in the Wan der Waals (γLW) component and an increase in the acid-based (γAB) component caused by the biosurfactant coating of polysterene. However, our results suggested that the biosurfactant inhibited the adhesion of bacteria independently on their surface charges. AFM scanning revealed three-type biosurfactant structures (micelles, cord-like assemblies and large vesicles) formed on glass, depending on concentrations used, that could lead to diverse anti-adhesive effects against different bacterial species.