We study electronic and magnetic properties of the quasi-one-dimensional spin-1/2 magnet Ba3Cu3Sc4O12 with a distinct orthogonal connectivity of CuO4 plaquettes. An effective low-energy model taking into account spin-orbit coupling was constructed by means of first-principles calculations. On this basis a complete microscopic magnetic model of Ba3Cu3Sc4O12, including symmetric and antisymmetric anisotropic exchange interactions, is derived. The anisotropic exchanges are obtained from a distinct first-principles numerical scheme combining, on one hand, the local density approximation taking into account spin-orbit coupling, and, on the other hand, projection procedure along with the microscopic theory by Toru Moriya. The resulting tensors of the symmetric anisotropy favor collinear magnetic order along the structural chains with the leading ferromagnetic coupling J1 = -9.88 meV. The interchain interactions J8 = 0.21 meV and J5 = 0.093 meV are antiferromagnetic. Quantum Monte Carlo simulations demonstrated that the proposed model reproduces the experimental Neel temperature, magnetization and magnetic susceptibility data. The modeling of neutron diffraction data reveals an important role of the covalent Cu-O bonding in Ba3Cu3Sc4O12.