In this paper, we investigate the geodesic motion of massive and massless test particles in the vicinity of a black hole space-time surrounded by perfect fluid (quintessence, dust, radiation, cosmological constant and phantom) in Rastall theory. We obtain analytical solutions of the equations of motion for geodesics in vicinity of space-time of this black hole. For all cases of perfect fluid, we consider some different values of Rastall coupling constant kλ\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$k\lambda $$\end{document}, for which the equations of motion have integer powers of r~\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$${\tilde{r}}$$\end{document} and can be solved analytically. These analytical solutions are presented in the form of elliptic and also hyperelliptic functions. Also, by using analytical solutions, effective potential and L–E2\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$E^2$$\end{document} diagrams, we plot some examples of possible orbits. Moreover, different orbits are classified using angular momentum, conserved energy, electrical charge and Rastall parameters. Furthermore, we show that when Rastall parameter becomes zero (N=0\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$N=0$$\end{document}), our results are consistent with the analysis of a Reissner–Nordström black hole, however; when both Rastall parameter and electric charge vanish (N=Q=0)\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$(N=Q=0)$$\end{document}, the results are the same as the analysis of a Schwarzschild black hole. In addition, the application of astrophysics of these results has also been investigated.