The silicide Mo5Si3, with the W5Si3 structure, exhibits a high anisotropy of its coefficients of thermal expansion (CTEs) in the a and c directions, namely, CTE(c)/CTE(a)=2.2. In order to determine whether the CTE anisotropy can be controlled, molybdenum was partially substituted with Nb. CTEs were determined by high temperature x-ray powder diffraction. Partial substitution with 44 at. % Nb reduced the value of CTE(c)/CTE(a) to a value near 1. For higher Nb concentrations, CTE(c)/CTE(a) increased again. When nearly all the Mo was replaced by Nb, the crystal structure changed to the Cr5B3 structure type and the CTE anisotropy decreased to a value near 1. Our thermal expansion results are interpreted in terms of the site occupation of Nb, the Nb-induced increase in the interatomic spacing of the Mo atom chains along the c-direction, and the reduction in the anisotropy of the lattice anharmonicity in the a and c directions.