A liquid ejection head comprising: a substrate including a pressure generating element configured to apply pressure to a first liquid; a member provided with an ejection port configured to eject a second liquid; a pressure chamber including the ejection port and the pressure generating element; and a liquid flow passage formed by using the substrate and the member, the liquid flow passage including the pressure chamber and allowing at least the first liquid and the second liquid to flow, wherein the substrate includes a first inflow port located on an upstream side of the pressure chamber in a direction of flow of the liquids (y) in the liquid flow passage and configured to allow the first liquid to flow into the liquid flow passage, a second inflow port located on the upstream side of the first inflow port and configured to allow the second liquid to flow into the liquid flow passage, a first outflow port located on a downstream side of the pressure generating element and configured to allow the first liquid to flow out of the liquid flow passage, a second outflow port located on a downstream side of the first outflow port and configured to allow the second liquid to flow out of the liquid flow passage, and a wall provided between the first inflow port and the second inflow port and having a portion located at a higher position than a surface of the substrate on the downstream side of the first inflow port in the direction of flow of the liquids in the liquid flow passage, and wherein the liquid ejection head is configured to make, in the pressure chamber, the first liquid flow in contact with the pressure generating element, and the second liquid flow closer to the ejection port than the first liquid and to make the first liquid flow in contact with the second liquid, or a third liquid flow while being in contact with the first liquid and the second liquid. a substrate including a pressure generating element configured to apply pressure to a first liquid; a member provided with an ejection port configured to eject a second liquid; a pressure chamber including the ejection port and the pressure generating element; and a liquid flow passage formed by using the substrate and the member, the liquid flow passage including the pressure chamber and allowing at least the first liquid and the second liquid to flow, wherein the substrate includes a first inflow port located on an upstream side of the pressure chamber in a direction of flow of the liquids (y) in the liquid flow passage and configured to allow the first liquid to flow into the liquid flow passage, a second inflow port located on the upstream side of the first inflow port and configured to allow the second liquid to flow into the liquid flow passage, a first outflow port located on a downstream side of the pressure generating element and configured to allow the first liquid to flow out of the liquid flow passage, a second outflow port located on a downstream side of the first outflow port and configured to allow the second liquid to flow out of the liquid flow passage, and a wall provided between the first inflow port and the second inflow port and having a portion located at a higher position than a surface of the substrate on the downstream side of the first inflow port in the direction of flow of the liquids in the liquid flow passage, and wherein a first inflow port located on an upstream side of the pressure chamber in a direction of flow of the liquids (y) in the liquid flow passage and configured to allow the first liquid to flow into the liquid flow passage, a second inflow port located on the upstream side of the first inflow port and configured to allow the second liquid to flow into the liquid flow passage, a first outflow port located on a downstream side of the pressure generating element and configured to allow the first liquid to flow out of the liquid flow passage, a second outflow port located on a downstream side of the first outflow port and configured to allow the second liquid to flow out of the liquid flow passage, and a wall provided between the first inflow port and the second inflow port and having a portion located at a higher position than a surface of the substrate on the downstream side of the first inflow port in the direction of flow of the liquids in the liquid flow passage, and wherein the liquid ejection head is configured to make, in the pressure chamber, the first liquid flow in contact with the pressure generating element, and the second liquid flow closer to the ejection port than the first liquid and to make the first liquid flow in contact with the second liquid, or a third liquid flow while being in contact with the first liquid and the second liquid. the first liquid flow in contact with the second liquid, or a third liquid flow while being in contact with the first liquid and the second liquid.