The Fulde-Ferrell-Larkin-Ovchinnikov (FFLO) state is examined in quasi-one-dimensional s-wave and d-wave superconductors with particular attention paid to the effect of the Fermi-surface anisotropy. The upper critical field $H_{c2}(T)$ is found to exhibit a qualitatively different behavior depending on the ratio of the hopping energies $t_b/t_a$ and the direction of the FFLO modulation vector q, where $t_a$ and $t_b$ are the intra- and interchain hopping energies, respectively. In particular, when $t_b/t_a < 0.1$ and $\mathbf{q} \parallel \mathbf{a}$, we find a novel dimensional crossover of $H_{c2}(T)$ from one dimension to two dimensions, where a is the lattice vector of the most conductive chain. Just below the tricritical temperature $T^*$, the upper critical field $H_{c2}(T)$ increases steeply as in one-dimensional systems, but when the temperature decreases, the rate of increase in $H_{c2}(T)$ diminishes and a shoulder appears. Near $T = 0$, $H_{c2}(T)$ shows a behavior typical of the FFLO state in two-dimensional systems, i.e., an upturn with a finite field at $T = 0$. When the angle between $\mathbf{q}$ and $\mathbf{a}$ is large, the upper critical field curve is convex upward at low temperatures, as in three-dimensional systems, but the magnitude is much larger than that of a three-dimensional isotropic system. For $t_b/t_a > 0.15$, the upper critical fields exhibit a two-dimensional behavior, except for a slight shoulder in the range of $0.2 > t_b/t_a > 0.15$. The upper critical field is maximum for $\mathbf{q} \parallel \mathbf{a}$ both for s-wave and d-wave pairings, while it is only slightly larger than the Pauli paramagnetic limit for $\mathbf{q} \perp \mathbf{a}$. The relevance of the present results to the organic superconductor ${\rm (TMTSF)_2ClO_4}$ is discussed.