The temperature (T) and applied magnetic field (H) dependent magnetization has been measured for a single crystal of TmNi2B2C in order to study the interplay of superconductivity and the magnetism of the Tm sublattice. The normal-state magnetization of TmNi2B2C is anisotropic from 2 to 300 K with the magnetic field applied normal to the c axis (H perpendicular to c) leading to a smaller induced magnetization than the magnetization for the magnetic field applied parallel to the c axis (H parallel to c). This anisotropy is attributed to crystalline electric field (CEF) splitting of the J=6 manifold of the Tm+3 ion. From the inverse susceptibility [1/chi(T)] for H parallel to c and H perpendicular to c, the CEF parameter, B-2(0), is found to be (-1.15+/-0.02) K. The superconducting state magnetization for H approximate to H-c2(T) obeys the Ginzburg-Landau theory which is used to evaluate the upper critical magnetic field H-c2(T) and dH(c2)/dT\T-c values. The superconducting properties in this temperature region are similar to those of the nonmagnetic superconductor YNi2B2C, which has been shown to be an isotropic conventional type-II superconductor. For T less than or equal to 6 K, H-c2(T) shows highly anisotropic behavior: H(c2)(perpendicular to c)approximate to 2H(c2)(parallel to c). For both H parallel to c and H perpendicular to c, H-c2(T) reaches a broad maximum near 4 K and decreases as T approaches T-N=(1.52+/-0.05) K, indicating the interplay between superconductivity and magnetism. The broad maximum in H-c2( T) of TmNi2B2C is likely a result of the increasing Tm sublattice magnetization at H-c2(T) with decreasing temperature, rather than of antiferromagnetic fluctuations.