From the hydrodynamics perspective, the assumption of viscous effects in the cosmic fluid is quite natural since the perfect fluid is, after all, an abstraction. In this work, we investigated the significance of viscosity coefficients to describe the observed cosmic acceleration by taking into account a cosmological
f(
R,
Lm) model with an anisotropic background. We considered $f(R,{L}_{m})=\tfrac{R}{2}+{L}_{m}^{\alpha }$, where
α is an arbitrary parameter, with the effective equation of state $\bar{p}=p-3\zeta H$ that is the Einstein case value with proportionality constant
ζ used in the Einstein theory [
51]. In section
3, we obtained the analytical expression of the Hubble parameter H(z) by incorporating the assumed
f(
R,
Lm) viscous fluid model. Further, in section
4, we analyzed the viability of the assumed
f(
R,
Lm) model by incorporating the observational data sets, specifically, H(z) data sets and the Pantheon supernovae data sets. The obtained best fit values are $\alpha ={0.903}_{-0.10}^{+0.091}$, $\zeta ={180.006}_{-0.10}^{+0.092}$,
n = 0.195 ± 0.096, and
H0 = 66.499 ± 0.097 for the H(z) datasets,
α = 0.899 ± 0.098,
ζ = 179.99 ± 0.10,
n = 0.196 ± 0.098, and
H0 = 66.498 ± 0.097 for the Pantheon datasets, and
α = 0.895 ± 0.098,
ζ = 180.007 ± 0.099,
n = 0.195 ± 0.099, and
H0 = 66.50 ± 0.10 [
75] for the combined H(z)+Pantheon datsets. In section
5, the behavior of some cosmological parameters has been presented. We observed that the energy density presented in figure
4 decreases with the expansion of the Universe, whereas the bulk viscous pressure presented in figure
5 indicates the negative behavior. The skewness parameter presented in figure
6 favors the anisotropic type evolution of the Universe during the entire time regime. Further, the effective EoS parameter in figure
7 shows the accelerating nature of the cosmic expansion with the present values
ω0 ≈ −0.9,
ω0 ≈ −0.85, and
ω0 ≈ −0.8 corresponding to H(z), Pantheon, and the combined H(z)+Pantheon data sets respectively. Finally, from figure
8 we found that our cosmological
f(
R,
Lm) model exhibits quintessence behavior, and it favors the de-Sitter type expansion in the far future. In section
6, energy conditions have been analyzed to interpret the viability of the obtained solution. All energy conditions except SEC exhibit positive behavior (see figures
9 and
10), whereas the violation of SEC presented in figure
11 strongly supports the accelerating nature of cosmic expansion with the transition from decelerated to accelerated era.