In this paper, we study Friedmann cosmology with time-varying vacuum energy density in the context of Brans–Dicke theory. We consider an isotropic and homogeneous flat space, filled with a matter-dominated perfect fluid and a dynamical cosmological term $$\varLambda (t) $$
Λ
(
t
)
, obeying the equation of state of the vacuum. As the exact nature of a possible time-varying vacuum is yet to be found, we explore $$\varLambda (t)$$
Λ
(
t
)
given by the phenomenological law $$\varLambda (t)=\lambda +\sigma H$$
Λ
(
t
)
=
λ
+
σ
H
, where $$\lambda $$
λ
and $$\sigma $$
σ
are positive constants. We solve the model and then focus on two different cases $$\varLambda _{H1}$$
Λ
H
1
and $$\varLambda _{H2}$$
Λ
H
2
by assuming $$\varLambda =\lambda $$
Λ
=
λ
and $$\varLambda =\sigma H$$
Λ
=
σ
H
, respectively. Notice that $$\varLambda _{H1}$$
Λ
H
1
is the analog of the standard $$\varLambda $$
Λ
CDM, but within the Brans–Dicke cosmology. We find the analytical solution of the main cosmological functions such as the Hubble parameter, the scale factor, deceleration and equation of state parameters for these models. In order to test the viability of the cosmological scenarios, we perform two sets of joint observational analyses of the recent Type Ia supernova data (Pantheon), observational measurements of Hubble parameter data, Baryon acoustic oscillation/Cosmic microwave background data and Local Hubble constant for each model. For the sake of comparison, the same data analysis is performed for the $$\varLambda $$
Λ
CDM model. Each model shows a transition from decelerated phase to accelerated phase and can be viewed as an effective quintessence behavior. Using the model selection criteria AIC and BIC to distinguish from existing dark energy models, we find that the Brans–Dicke analog of the $$\varLambda $$
Λ
-cosmology (i.e. our model $$\varLambda _{H1}$$
Λ
H
1
) performs at a level comparable to the standard $$\varLambda $$
Λ
CDM, whereas $$\varLambda _{H2}$$
Λ
H
2
is less favoured.