To explore a suitable carrier for lamivudine drug, the incorporation of lamivudine inside the single walled carbon nanotubes (SWCNTs) has been investigated by using first-principles van der Waals density functional (vdW-DF) calculations. The obtained binding energies reveal that lamivudine prefers to be encapsulated into the metallic nanotubes with diameter of about 13Å. Semiconducting SWCNTs exhibit slightly weaker interaction strength with the lamivudine in comparison with the metallic counterparts. However, the calculated binding energies for both considered nanotubes are typical for the physisorption. The influence of nanotube length on the lamivudine incorporation inside the various considered nanotubes has also been investigated and the results show that it plays an important role in the encapsulation process. The electronic structures analysis for the energetically most favorable complexes reveal that incorporated lamivudine changes slightly the electronic properties of SWCNTs. This indicates that there is no considerable hybridization between the corresponding orbitals and the weak interaction obtained quantitatively in terms of binding energies.